From e80f5e4c8569b7d30eff553cda234c0089c0abe7 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 18 Sep 2018 11:45:13 -0400 Subject: [PATCH] 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. --- core/core.el | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/core/core.el b/core/core.el index 7dda9a4b2..a135c25ab 100644 --- a/core/core.el +++ b/core/core.el @@ -371,15 +371,14 @@ If this is a daemon session, load them all immediately instead." issues easier. Meant to be used with `run-hook-wrapped'." - (let ((gc-cons-threshold doom-gc-cons-upper-limit)) - (when doom-debug-mode - (message "Running doom hook: %s" hook)) - (condition-case e - (funcall hook) - ((debug error) - (signal 'doom-hook-error (list hook e)))) - ;; return nil so `run-hook-wrapped' won't short circuit - nil)) + (when doom-debug-mode + (message "Running doom hook: %s" hook)) + (condition-case e + (funcall hook) + ((debug error) + (signal 'doom-hook-error (list hook e)))) + ;; return nil so `run-hook-wrapped' won't short circuit + nil) (defun doom-ensure-same-emacs-version-p () "Check if the running version of Emacs has changed and set