Revert da7f9019 & refactor doom init hooks

This commit is contained in:
Henrik Lissner 2018-08-21 04:27:14 +02:00
parent 9a4cce8d9a
commit 62977247c9
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 4 additions and 10 deletions

View file

@ -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))))
;;

View file

@ -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

View file

@ -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)