diff options
author | Case Duckworth | 2021-04-27 15:35:42 -0500 |
---|---|---|
committer | Case Duckworth | 2021-04-27 15:35:42 -0500 |
commit | 8b3af62cc98a4eb178dd7e7529bd93ef39c86c49 (patch) | |
tree | 070b0bae144ab0b16e0e55bf4f9a7b04bf27d5f5 | |
parent | Merge branch 'main' of https://tildegit.org/acdw/emacs (diff) | |
download | emacs-8b3af62cc98a4eb178dd7e7529bd93ef39c86c49.tar.gz emacs-8b3af62cc98a4eb178dd7e7529bd93ef39c86c49.zip |
Add prefix arg to pull ~/.emacs from git
I could probably do better things with the output and error buffers. Whatever.
-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 |