diff options
author | Case Duckworth | 2021-04-22 10:06:39 -0500 |
---|---|---|
committer | Case Duckworth | 2021-04-22 10:06:39 -0500 |
commit | 87ffff0ac01db8e2bdf3a5e3a6025e9d96c48829 (patch) | |
tree | e2a9f893a49f0bc6fbee6b697e9f017237d341f5 | |
parent | Fix wrong function calls (diff) | |
download | emacs-87ffff0ac01db8e2bdf3a5e3a6025e9d96c48829.tar.gz emacs-87ffff0ac01db8e2bdf3a5e3a6025e9d96c48829.zip |
Also load files in .emacs.d/lisp when running `refresh-emacs'
-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 |