Mercurial > emacs
changeset 10169:04425b872c5b
(hack-local-variables): Run hack-local-variables-hook.
(hack-local-variables-hook): New variable.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 15 Dec 1994 12:36:03 +0000 |
parents | 64163654c255 |
children | 5fc240a3e4a0 |
files | lisp/files.el |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/files.el Thu Dec 15 12:16:29 1994 +0000 +++ b/lisp/files.el Thu Dec 15 12:36:03 1994 +0000 @@ -1077,6 +1077,11 @@ (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." (hack-local-variables-prop-line) @@ -1147,7 +1152,8 @@ (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 '(enable-local-eval)