diff --git a/core/core-modules.el b/core/core-modules.el index 5b12eccfc..e6cdf15e4 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -56,13 +56,7 @@ non-nil." (load! "config" (plist-get plist :path) t))) doom-modules) (load! "config" doom-private-dir t) - (if after-init-time - (doom|run-post-init-hook) - (add-hook 'emacs-startup-hook #'doom|run-post-init-hook))))) - -(defun doom|run-post-init-hook () - "Run `doom-post-init-hook'. That's all." - (run-hook-wrapped 'doom-post-init-hook #'doom-try-run-hook)) + (run-hook-wrapped 'doom-post-init-hook #'doom-try-run-hook)))) ;; diff --git a/core/core-ui.el b/core/core-ui.el index 10ee7988b..c31dcb2a3 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -498,7 +498,7 @@ frame's window-system, the theme will be reloaded.") ;; (run-hook-wrapped 'doom-init-ui-hook #'doom-try-run-hook)) -(add-hook 'doom-post-init-hook #'doom|init-ui) +(add-hook 'emacs-startup-hook #'doom|init-ui) (provide 'core-ui) ;;; core-ui.el ends here diff --git a/core/core.el b/core/core.el index 2cfe8b565..34d7b31a3 100644 --- a/core/core.el +++ b/core/core.el @@ -305,7 +305,6 @@ and `doom-exit-window-hook'." (if disable (advice-remove (car spec) (cdr spec)) (advice-add (car spec) :around (cdr spec))))) -(add-hook 'doom-post-init-hook #'doom|init-switch-hooks) (defun doom*load-theme-hooks (theme &rest _) "Set up `doom-load-theme-hook' to run after `load-theme' is called." @@ -448,7 +447,8 @@ to least)." (require 'core-os) (when (or force-load-core-p (not noninteractive)) - (add-hook 'emacs-startup-hook #'doom|display-benchmark) + (add-hook! 'emacs-startup-hook + #'(doom|init-switch-hooks doom|display-benchmark)) (require 'core-ui) (require 'core-editor)