From fd61150f601d1c9c1c8443690334203e1f0e37ca Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 17 Sep 2022 12:12:11 +0200 Subject: [PATCH] refactor: local-vars: don't intern unneeded symbols If the hook doesn't exist, it hasn't been bound to, and doom-run-hooks will no-op if passed a nil. Saves a tiny bit on memory usage. --- lisp/doom-start.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/doom-start.el b/lisp/doom-start.el index 81ab5d141..7f6248ef0 100644 --- a/lisp/doom-start.el +++ b/lisp/doom-start.el @@ -158,7 +158,7 @@ "Run MODE-local-vars-hook after local variables are initialized." (unless (or doom-inhibit-local-var-hooks delay-mode-hooks) (setq-local doom-inhibit-local-var-hooks t) - (doom-run-hooks (intern (format "%s-local-vars-hook" major-mode))))) + (doom-run-hooks (intern-soft (format "%s-local-vars-hook" major-mode))))) ;; If the user has disabled `enable-local-variables', then ;; `hack-local-variables-hook' is never triggered, so we trigger it at the end