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.
This commit is contained in:
Henrik Lissner 2022-09-17 12:12:11 +02:00
parent f5786a7284
commit fd61150f60
No known key found for this signature in database
GPG Key ID: B60957CA074D39A3

View File

@ -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