Rewrite doom/reload
This commit is contained in:
parent
09f077259e
commit
7727920629
2 changed files with 7 additions and 15 deletions
|
@ -39,24 +39,15 @@ Runs `doom-reload-hook' afterwards."
|
||||||
"Reload anyway?"))
|
"Reload anyway?"))
|
||||||
(user-error "Aborted"))
|
(user-error "Aborted"))
|
||||||
(require 'core-cli)
|
(require 'core-cli)
|
||||||
(require 'core-packages)
|
(let ((doom-reloading-p t))
|
||||||
(doom-delete-autoloads-file doom-autoload-file)
|
(compile (format "%s/bin/doom refresh -f" doom-emacs-dir))
|
||||||
(doom-delete-autoloads-file doom-package-autoload-file)
|
(while compilation-in-progress
|
||||||
(let ((doom-reloading-p t)
|
(sit-for 1))
|
||||||
doom-init-p
|
|
||||||
doom-init-modules-p
|
|
||||||
doom-init-packages-p)
|
|
||||||
(let ((default-directory doom-core-dir))
|
|
||||||
(mapc (doom-rpartial #'load 'noerror 'nomessage)
|
|
||||||
(file-expand-wildcards "autoload/*.el")))
|
|
||||||
(doom-initialize 'force)
|
(doom-initialize 'force)
|
||||||
(when (file-exists-p doom-env-file)
|
|
||||||
(doom-reload-env-file))
|
|
||||||
(doom-reload-autoloads nil 'force)
|
|
||||||
(with-demoted-errors "PRIVATE CONFIG ERROR: %s"
|
(with-demoted-errors "PRIVATE CONFIG ERROR: %s"
|
||||||
(general-auto-unbind-keys)
|
(general-auto-unbind-keys)
|
||||||
(unwind-protect
|
(unwind-protect
|
||||||
(doom-initialize-modules)
|
(doom-initialize-modules 'force)
|
||||||
(general-auto-unbind-keys t)))
|
(general-auto-unbind-keys t)))
|
||||||
(run-hook-wrapped 'doom-reload-hook #'doom-try-run-hook))
|
(run-hook-wrapped 'doom-reload-hook #'doom-try-run-hook))
|
||||||
(message "Finished!"))
|
(message "Finished!"))
|
||||||
|
|
|
@ -849,7 +849,8 @@ compelling reason, so..."
|
||||||
#'+org-init-smartparens-h)
|
#'+org-init-smartparens-h)
|
||||||
|
|
||||||
;; In case the user has eagerly loaded org from their configs
|
;; In case the user has eagerly loaded org from their configs
|
||||||
(when (featurep 'org)
|
(when (and (featurep 'org)
|
||||||
|
(not doom-reloading-p))
|
||||||
(message "`org' was already loaded by the time lang/org loaded, this may cause issues")
|
(message "`org' was already loaded by the time lang/org loaded, this may cause issues")
|
||||||
(run-hooks 'org-load-hook))
|
(run-hooks 'org-load-hook))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue