Remove unnecessary optimization in doom-try-run-hook
Hooks run with this should already be run in a gc-deferred state (at startup), so deferring garbage collection _again_ may just cause unnecessary consing.
This commit is contained in:
parent
b7be38b2a9
commit
e80f5e4c85
1 changed files with 8 additions and 9 deletions
17
core/core.el
17
core/core.el
|
@ -371,15 +371,14 @@ If this is a daemon session, load them all immediately instead."
|
||||||
issues easier.
|
issues easier.
|
||||||
|
|
||||||
Meant to be used with `run-hook-wrapped'."
|
Meant to be used with `run-hook-wrapped'."
|
||||||
(let ((gc-cons-threshold doom-gc-cons-upper-limit))
|
(when doom-debug-mode
|
||||||
(when doom-debug-mode
|
(message "Running doom hook: %s" hook))
|
||||||
(message "Running doom hook: %s" hook))
|
(condition-case e
|
||||||
(condition-case e
|
(funcall hook)
|
||||||
(funcall hook)
|
((debug error)
|
||||||
((debug error)
|
(signal 'doom-hook-error (list hook e))))
|
||||||
(signal 'doom-hook-error (list hook e))))
|
;; return nil so `run-hook-wrapped' won't short circuit
|
||||||
;; return nil so `run-hook-wrapped' won't short circuit
|
nil)
|
||||||
nil))
|
|
||||||
|
|
||||||
(defun doom-ensure-same-emacs-version-p ()
|
(defun doom-ensure-same-emacs-version-p ()
|
||||||
"Check if the running version of Emacs has changed and set
|
"Check if the running version of Emacs has changed and set
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue