Extract refresh dispatcher into doom//refresh
This commit is contained in:
parent
7377ba7537
commit
c4bbffd7ee
1 changed files with 13 additions and 6 deletions
|
@ -196,12 +196,7 @@ recompile. Run this whenever you:
|
||||||
2. Add or remove `package!' blocks to your config,
|
2. Add or remove `package!' blocks to your config,
|
||||||
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//reload-doom-autoloads)
|
(doom//refresh))
|
||||||
(unwind-protect
|
|
||||||
(progn (doom//packages-autoremove)
|
|
||||||
(doom//packages-install))
|
|
||||||
(doom//reload-package-autoloads)
|
|
||||||
(doom//byte-compile nil 'recompile)))
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
@ -221,6 +216,18 @@ recompile. Run this whenever you:
|
||||||
(string-match-p "[^ \t\n]" (buffer-string))
|
(string-match-p "[^ \t\n]" (buffer-string))
|
||||||
(error "Failed to check working tree in %s" dir)))))
|
(error "Failed to check working tree in %s" dir)))))
|
||||||
|
|
||||||
|
(defun doom//refresh ()
|
||||||
|
"Ensure Doom is in a working state by checking autoloads and packages, and
|
||||||
|
recompiling any changed compiled files. This is the shotgun solution to most
|
||||||
|
problems with doom."
|
||||||
|
(interactive)
|
||||||
|
(doom//reload-doom-autoloads)
|
||||||
|
(unwind-protect
|
||||||
|
(progn (doom//packages-autoremove)
|
||||||
|
(doom//packages-install))
|
||||||
|
(doom//reload-package-autoloads)
|
||||||
|
(doom//byte-compile nil 'recompile)))
|
||||||
|
|
||||||
(defun doom//upgrade ()
|
(defun doom//upgrade ()
|
||||||
"Upgrade Doom to the latest version."
|
"Upgrade Doom to the latest version."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue