# HG changeset patch # User Richard M. Stallman # Date 787494963 0 # Node ID 04425b872c5b3e5f3cee724da35b966f2a009bf4 # Parent 64163654c2550787014bea95326509d1c4e8d9ac (hack-local-variables): Run hack-local-variables-hook. (hack-local-variables-hook): New variable. diff -r 64163654c255 -r 04425b872c5b lisp/files.el --- 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)