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:
parent
f5786a7284
commit
fd61150f60
1 changed files with 1 additions and 1 deletions
|
@ -158,7 +158,7 @@
|
||||||
"Run MODE-local-vars-hook after local variables are initialized."
|
"Run MODE-local-vars-hook after local variables are initialized."
|
||||||
(unless (or doom-inhibit-local-var-hooks delay-mode-hooks)
|
(unless (or doom-inhibit-local-var-hooks delay-mode-hooks)
|
||||||
(setq-local doom-inhibit-local-var-hooks t)
|
(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
|
;; If the user has disabled `enable-local-variables', then
|
||||||
;; `hack-local-variables-hook' is never triggered, so we trigger it at the end
|
;; `hack-local-variables-hook' is never triggered, so we trigger it at the end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue