Run doom-post-init-hook as late as possible
Possibly fixes recursive load errors, to do with kill-buffer-query-functions and buffer-predicate autoloads loading in a weird way on Emacs 25 (and especially on MacOS, for some reason).
This commit is contained in:
parent
ee73d6c9af
commit
da7f9019d1
2 changed files with 9 additions and 3 deletions
|
@ -56,7 +56,13 @@ non-nil."
|
||||||
(load! "config" (plist-get plist :path) t)))
|
(load! "config" (plist-get plist :path) t)))
|
||||||
doom-modules)
|
doom-modules)
|
||||||
(load! "config" doom-private-dir t)
|
(load! "config" doom-private-dir t)
|
||||||
(run-hook-wrapped 'doom-post-init-hook #'doom-try-run-hook))))
|
(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))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -233,7 +233,7 @@ original value of `symbol-file'."
|
||||||
module init.el files, but before their config.el files are loaded.")
|
module init.el files, but before their config.el files are loaded.")
|
||||||
|
|
||||||
(defvar doom-post-init-hook nil
|
(defvar doom-post-init-hook nil
|
||||||
"A list of hooks run when Doom is fully initialized. Fires at the end of
|
"A list of hooks run when Doom is fully initialized. Fires near the end of
|
||||||
`emacs-startup-hook', as late as possible. Guaranteed to run after everything
|
`emacs-startup-hook', as late as possible. Guaranteed to run after everything
|
||||||
else (except for `window-setup-hook').")
|
else (except for `window-setup-hook').")
|
||||||
|
|
||||||
|
@ -305,7 +305,7 @@ and `doom-exit-window-hook'."
|
||||||
(if disable
|
(if disable
|
||||||
(advice-remove (car spec) (cdr spec))
|
(advice-remove (car spec) (cdr spec))
|
||||||
(advice-add (car spec) :around (cdr spec)))))
|
(advice-add (car spec) :around (cdr spec)))))
|
||||||
(add-hook 'emacs-startup-hook #'doom|init-switch-hooks)
|
(add-hook 'doom-post-init-hook #'doom|init-switch-hooks)
|
||||||
|
|
||||||
(defun doom*load-theme-hooks (theme &rest _)
|
(defun doom*load-theme-hooks (theme &rest _)
|
||||||
"Set up `doom-load-theme-hook' to run after `load-theme' is called."
|
"Set up `doom-load-theme-hook' to run after `load-theme' is called."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue