Rename reload dispatcher to refresh & refactor

This commit is contained in:
Henrik Lissner
2018-05-20 20:05:35 +02:00
parent 454a962d6b
commit 89c52e7d99

View File

@ -155,8 +155,8 @@ respectively."
"Reports the version of Doom and Emacs." "Reports the version of Doom and Emacs."
(doom//version)) (doom//version))
(def-dispatcher! (reload re) (def-dispatcher! (refresh re)
"Reload Doom. "Refresh Doom.
This is the equivalent of running autoremove, install, autoloads, then This is the equivalent of running autoremove, install, autoloads, then
recompile. Run this whenever you: recompile. Run this whenever you:
@ -166,13 +166,13 @@ recompile. Run this whenever you:
3. Add or remove autoloaded functions in module autoloaded files. 3. Add or remove autoloaded functions in module autoloaded files.
4. Update Doom outside of Doom (e.g. with git)" 4. Update Doom outside of Doom (e.g. with git)"
(doom-initialize) (doom-initialize)
(if (let* ((doom--inhibit-reload t) (let (reload-p)
(autoremove-p (doom//packages-autoremove)) (when (let* ((doom--inhibit-reload t)
(install-p (doom//packages-install))) (autoremove-p (doom//packages-autoremove))
(or autoremove-p install-p)) (install-p (doom//packages-install)))
(doom//reload) (or autoremove-p install-p))
(doom//reload-autoloads)) (doom//reload))
(doom//byte-compile nil 'recompile)) (doom//byte-compile nil 'recompile)))
;; ;;