Add doom-run-hooks
Produces more helpful (and harder-to-miss) error messages when a hook emits an error. Also advises run-hook when doom-debug-mode is active, so errors in hooks (generally, major mode hooks) don't quietly go unnoticed.
This commit is contained in:
parent
df10383a26
commit
ff64a9d106
6 changed files with 35 additions and 20 deletions
|
@ -77,13 +77,11 @@ symbol and CDR is the value to set it to when `doom-debug-mode' is activated.")
|
|||
emacs -Q -l init.el -f doom-run-all-startup-hooks-h"
|
||||
(setq after-init-time (current-time))
|
||||
(let ((inhibit-startup-hooks nil))
|
||||
(mapc (lambda (hook)
|
||||
(run-hook-wrapped hook #'doom-try-run-hook))
|
||||
'(after-init-hook
|
||||
delayed-warnings-hook
|
||||
emacs-startup-hook
|
||||
tty-setup-hook
|
||||
window-setup-hook))))
|
||||
(doom-run-hooks 'after-init-hook
|
||||
'delayed-warnings-hook
|
||||
'emacs-startup-hook
|
||||
'tty-setup-hook
|
||||
'window-setup-hook)))
|
||||
|
||||
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue