Narrow down the purpose of init & post-init hooks
Essential hooks should be added to doom-init-hook. Non-essential and extra hooks should be added to doom-psot-init-hook.
This commit is contained in:
parent
c0680e6fa3
commit
25619908a2
5 changed files with 7 additions and 6 deletions
|
@ -122,11 +122,12 @@ melodramatic ex-vimmer disappointed with the text-editor status quo."
|
|||
;; Custom init hooks; clearer than `after-init-hook', `emacs-startup-hook', and
|
||||
;; `window-setup-hook'.
|
||||
(defvar doom-init-hook nil
|
||||
"A list of hooks run when DOOM is initialized, before `doom-post-init-hook'.")
|
||||
"A list of hooks run when DOOM is initialized, before `doom-post-init-hook'.
|
||||
Use this for essential functionality.")
|
||||
|
||||
(defvar doom-post-init-hook nil
|
||||
"A list of hooks run after DOOM initialization is complete, and after
|
||||
`doom-init-hook'.")
|
||||
`doom-init-hook'. Use this for extra, non-essential functionality.")
|
||||
|
||||
(defun doom-try-run-hook (fn hook)
|
||||
"Runs a hook wrapped in a `condition-case-unless-debug' block; its objective
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue