diff options
-rw-r--r-- | lisp/acdw.el | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lisp/acdw.el b/lisp/acdw.el index 96b69f9..54b139c 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el | |||
@@ -54,9 +54,19 @@ each hook in HOOKS." | |||
54 | ,@(dolist (hook hook-list hook-defun-add-hook-list) | 54 | ,@(dolist (hook hook-list hook-defun-add-hook-list) |
55 | (push `(add-hook ',hook #',func-name) hook-defun-add-hook-list))))) | 55 | (push `(add-hook ',hook #',func-name) hook-defun-add-hook-list))))) |
56 | 56 | ||
57 | (defun refresh-emacs () | 57 | (defun refresh-emacs (&optional git-pull-first) |
58 | "Reload Emacs's configuration files." | 58 | "Reload Emacs's configuration files. |
59 | (interactive) | 59 | |
60 | With a prefix argument, run git pull on the repo first." | ||
61 | (interactive "P") | ||
62 | (when git-pull-first | ||
63 | (with-message "Pulling Emacs's configuration" | ||
64 | (shell-command (concat "git -C " | ||
65 | "\"" (expand-file-name user-emacs-directory) "\"" | ||
66 | " pull") | ||
67 | (get-buffer-create "*refresh-emacs-output*") | ||
68 | (get-buffer-create "*refresh-emacs-error*")))) | ||
69 | |||
60 | (let ((init-files (append | 70 | (let ((init-files (append |
61 | ;; Load lisp libraries first, in case their functionality | 71 | ;; Load lisp libraries first, in case their functionality |
62 | ;; is used by {early-,}init.el | 72 | ;; is used by {early-,}init.el |