about summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
authorCase Duckworth2021-04-22 10:06:39 -0500
committerCase Duckworth2021-04-22 10:06:39 -0500
commit87ffff0ac01db8e2bdf3a5e3a6025e9d96c48829 (patch)
treee2a9f893a49f0bc6fbee6b697e9f017237d341f5 /lisp
parentFix wrong function calls (diff)
downloademacs-87ffff0ac01db8e2bdf3a5e3a6025e9d96c48829.tar.gz
emacs-87ffff0ac01db8e2bdf3a5e3a6025e9d96c48829.zip
Also load files in .emacs.d/lisp when running `refresh-emacs'
Diffstat (limited to 'lisp')
-rw-r--r--lisp/acdw.el17
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