aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/init-utils.el
blob: 64dadc6697884257d1abfc5bff86b95c9628ccd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
;; Loads functions from libs
(defun load-directory (dir)
  (let ((load-it (lambda (f)
                   (load-file (concat (file-name-as-directory dir) f)))
		 ))
    (mapc load-it (directory-files dir nil "\\.el$"))))

;; Load lib functions
(load-directory (expand-file-name "~/.emacs.d/lisp/lib/" user-emacs-directory))

;; This is borrowed from https://github.com/purcell/emacs.d/blob/master/lisp/init-utils.el by Steve Purcell but I have added some stuff.

(if (fboundp 'with-eval-after-load)
    (defalias 'after-load 'with-eval-after-load)
  (defmacro after-load (feature &rest body)
    "After FEATURE is loaded, evaluate BODY."
    (declare (indent defun))
    '(eval-after-load ,feature
       '(progn ,@body))))

;; Elapsed time
(myemacs/elapsed-time)

(provide 'init-utils)