feat: add doom-{before,after}-init-hook
doom-before-init-hook runs before $DOOMDIR/init.el is loaded. doom-after-init-hook runs at the *very* end of the Emacs startup process (after window-setup-hook).
This commit is contained in:
parent
18cd2eb483
commit
0d7c3eaf24
4 changed files with 81 additions and 34 deletions
|
@ -622,10 +622,7 @@ triggering hooks during startup."
|
|||
;; Initialize `doom-switch-buffer-hook'
|
||||
(add-hook 'window-buffer-change-functions #'doom-run-switch-buffer-hooks-h)
|
||||
;; `window-buffer-change-functions' doesn't trigger for files visited via the server.
|
||||
(add-hook 'server-visit-hook #'doom-run-switch-buffer-hooks-h)
|
||||
|
||||
;; Only execute this function once.
|
||||
(remove-hook 'window-buffer-change-functions #'doom-init-ui-h))
|
||||
(add-hook 'server-visit-hook #'doom-run-switch-buffer-hooks-h))
|
||||
|
||||
;; Apply fonts and theme
|
||||
(let ((hook (if (daemonp)
|
||||
|
@ -636,7 +633,7 @@ triggering hooks during startup."
|
|||
|
||||
;; Initialize UI as late as possible. `window-buffer-change-functions' runs
|
||||
;; once, when the scratch/dashboard buffer is first displayed.
|
||||
(add-hook 'window-buffer-change-functions #'doom-init-ui-h -100)
|
||||
(add-hook 'doom-after-init-hook #'doom-init-ui-h -100)
|
||||
|
||||
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue