# HG changeset patch # User Richard M. Stallman # Date 897718633 0 # Node ID f4871f285a9d0f245be11d147b016f1d756f5113 # Parent 3bd923346a65a0efe3611fa67a69b3febfe0106e (user-init-file): Default value now nil. (local-enable-local-variables): New variable. (set-auto-mode): Test it. diff -r 3bd923346a65 -r f4871f285a9d lisp/files.el --- a/lisp/files.el Sat Jun 13 06:16:32 1998 +0000 +++ b/lisp/files.el Sat Jun 13 06:17:13 1998 +0000 @@ -331,6 +331,11 @@ (sexp :tag "Query" :format "%t\n" other)) :group 'find-file) +(defvar local-enable-local-variables t + "Like `enable-local-variables' but meant for buffer-local bindings. +If a major mode sets this to nil, buffer-locally, then any local +variables list in the file will be ignored.") + (defcustom enable-local-eval 'maybe "*Control processing of the \"variable\" `eval' in a file's local variables. The value can be t, nil or something else. @@ -1327,9 +1332,8 @@ When checking `inhibit-first-line-modes-regexps', we first discard from the end of the file name anything that matches one of these regexps.") -(defvar user-init-file - "" ; set by command-line - "File name including directory of user's initialization file.") +(defvar user-init-file nil + "File name, including directory, of user's initialization file.") (defun set-auto-mode (&optional just-from-file-name) "Select major mode appropriate for current buffer. @@ -1353,6 +1357,7 @@ (goto-char (point-min)) (skip-chars-forward " \t\n") (and enable-local-variables + local-enable-local-variables ;; Don't look for -*- if this file name matches any ;; of the regexps in inhibit-first-line-modes-regexps. (let ((temp inhibit-first-line-modes-regexps)