diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/acdw.el | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/lisp/acdw.el b/lisp/acdw.el index 1a699bb..f1c1a8d 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el | |||
@@ -57,10 +57,19 @@ each hook in HOOKS." | |||
57 | (defun refresh-emacs () | 57 | (defun refresh-emacs () |
58 | "Reload Emacs's configuration files." | 58 | "Reload Emacs's configuration files." |
59 | (interactive) | 59 | (interactive) |
60 | (dolist (file (list (locate-user-emacs-file "early-init.el") | 60 | (dolist (file (append |
61 | (locate-user-emacs-file "init.el" ".emacs"))) | 61 | ;; Load lisp libraries first, in case their functionality is |
62 | (when (file-exists-p file) | 62 | ;; used by {early-,}init.el |
63 | (load-file file)))) | 63 | (let* ((dir (expand-file-name "lisp/" user-emacs-directory)) |
64 | (full-name (lambda (f) | ||
65 | (concat (file-name-as-directory dir) f)))) | ||
66 | (mapcar full-name (directory-files dir nil "\\.el\\'"))) | ||
67 | ;; Load regular init files | ||
68 | (list (locate-user-emacs-file "early-init.el") | ||
69 | (locate-user-emacs-file "init.el" ".emacs")))) | ||
70 | (with-message (format "Loading %s" file) | ||
71 | (when (file-exists-p file) | ||
72 | (load-file file))))) | ||
64 | 73 | ||
65 | (defun expand-file-name-exists-p (&rest expand-file-name-args) | 74 | (defun expand-file-name-exists-p (&rest expand-file-name-args) |
66 | "Call `expand-file-name' on EXPAND-FILE-NAME-ARGS, returning | 75 | "Call `expand-file-name' on EXPAND-FILE-NAME-ARGS, returning |