Add contingency plan for local-vars hooks
They don't run if enable-local-variables is set to nil.
This commit is contained in:
parent
1ec9f5b2e9
commit
024e27b618
|
@ -237,6 +237,13 @@ original value of `symbol-file'."
|
|||
#'doom-try-run-hook))
|
||||
(add-hook 'hack-local-variables-hook #'doom|run-local-var-hooks)
|
||||
|
||||
(defun doom|run-local-var-hooks-if-necessary ()
|
||||
"If `enable-local-variables' is disabled, then `hack-local-variables-hook' is
|
||||
never triggered."
|
||||
(unless enable-local-variables
|
||||
(doom|run-local-var-hooks)))
|
||||
(add-hook 'after-change-major-mode-hook #'doom|run-local-var-hooks-if-necessary)
|
||||
|
||||
|
||||
;;
|
||||
;; Incremental lazy-loading
|
||||
|
|
Loading…
Reference in New Issue
Block a user