Commit 1d517019 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(hack-local-variables): Run hack-local-variables-hook.

(hack-local-variables-hook): New variable.
parent efa2bb9c
......@@ -1077,6 +1077,11 @@ If `enable-local-variables' is nil, this function does not check for a
(hack-one-local-variable (car (car result)) (cdr (car result)))
(setq result (cdr result)))))))
(defvar hack-local-variables-hook nil
"Normal hook run after processing a file's local variables specs.
Major modes can use this to examine user-specified local variables
in order to initialize other data structure based on them.")
(defun hack-local-variables ()
"Parse and put into effect this buffer's local variables spec."
......@@ -1147,7 +1152,8 @@ If `enable-local-variables' is nil, this function does not check for a
(or (if suffix (looking-at suffix) (eolp))
(error "Local variables entry is terminated incorrectly"))
;; Set the variable. "Variables" mode and eval are funny.
(hack-one-local-variable var val))))))))
(hack-one-local-variable var val)))))))
(run-hooks 'hack-local-variables-hook))
(defconst ignored-local-variables
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment