mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Add contingency plan for local-vars hooks
They don't run if enable-local-variables is set to nil.
This commit is contained in:
@ -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
|
||||||
|
Reference in New Issue
Block a user