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
|
@ -117,10 +117,10 @@ non-nil."
|
|||
(when-let (init-p (load! doom-module-init-file doom-private-dir t))
|
||||
(doom-log "Initializing user config")
|
||||
(maphash (doom-module-loader doom-module-init-file) doom-modules)
|
||||
(run-hook-wrapped 'doom-before-init-modules-hook #'doom-try-run-hook)
|
||||
(run-hook-wrapped 'doom-before-init-modules-hook #'doom-run-hook)
|
||||
(unless no-config-p
|
||||
(maphash (doom-module-loader doom-module-config-file) doom-modules)
|
||||
(run-hook-wrapped 'doom-init-modules-hook #'doom-try-run-hook)
|
||||
(run-hook-wrapped 'doom-init-modules-hook #'doom-run-hook)
|
||||
(load! "config" doom-private-dir t)
|
||||
(load custom-file 'noerror (not doom-debug-mode))))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue