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
1 changed files with 7 additions and 0 deletions
|
@ -237,6 +237,13 @@ original value of `symbol-file'."
|
||||||
#'doom-try-run-hook))
|
#'doom-try-run-hook))
|
||||||
(add-hook 'hack-local-variables-hook #'doom|run-local-var-hooks)
|
(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
|
;; Incremental lazy-loading
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue