Mercurial > emacs
comparison lisp/files.el @ 22476:f4871f285a9d
(user-init-file): Default value now nil.
(local-enable-local-variables): New variable.
(set-auto-mode): Test it.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 13 Jun 1998 06:17:13 +0000 |
parents | 7e79814e7263 |
children | a85ad07a6e4b |
comparison
equal
deleted
inserted
replaced
22475:3bd923346a65 | 22476:f4871f285a9d |
---|---|
328 specifications and ignores this variable." | 328 specifications and ignores this variable." |
329 :type '(choice (const :tag "Obey" t) | 329 :type '(choice (const :tag "Obey" t) |
330 (const :tag "Ignore" nil) | 330 (const :tag "Ignore" nil) |
331 (sexp :tag "Query" :format "%t\n" other)) | 331 (sexp :tag "Query" :format "%t\n" other)) |
332 :group 'find-file) | 332 :group 'find-file) |
333 | |
334 (defvar local-enable-local-variables t | |
335 "Like `enable-local-variables' but meant for buffer-local bindings. | |
336 If a major mode sets this to nil, buffer-locally, then any local | |
337 variables list in the file will be ignored.") | |
333 | 338 |
334 (defcustom enable-local-eval 'maybe | 339 (defcustom enable-local-eval 'maybe |
335 "*Control processing of the \"variable\" `eval' in a file's local variables. | 340 "*Control processing of the \"variable\" `eval' in a file's local variables. |
336 The value can be t, nil or something else. | 341 The value can be t, nil or something else. |
337 A value of t means obey `eval' variables; | 342 A value of t means obey `eval' variables; |
1325 (defvar inhibit-first-line-modes-suffixes nil | 1330 (defvar inhibit-first-line-modes-suffixes nil |
1326 "List of regexps for what to ignore, for `inhibit-first-line-modes-regexps'. | 1331 "List of regexps for what to ignore, for `inhibit-first-line-modes-regexps'. |
1327 When checking `inhibit-first-line-modes-regexps', we first discard | 1332 When checking `inhibit-first-line-modes-regexps', we first discard |
1328 from the end of the file name anything that matches one of these regexps.") | 1333 from the end of the file name anything that matches one of these regexps.") |
1329 | 1334 |
1330 (defvar user-init-file | 1335 (defvar user-init-file nil |
1331 "" ; set by command-line | 1336 "File name, including directory, of user's initialization file.") |
1332 "File name including directory of user's initialization file.") | |
1333 | 1337 |
1334 (defun set-auto-mode (&optional just-from-file-name) | 1338 (defun set-auto-mode (&optional just-from-file-name) |
1335 "Select major mode appropriate for current buffer. | 1339 "Select major mode appropriate for current buffer. |
1336 This checks for a -*- mode tag in the buffer's text, | 1340 This checks for a -*- mode tag in the buffer's text, |
1337 compares the filename against the entries in `auto-mode-alist', | 1341 compares the filename against the entries in `auto-mode-alist', |
1351 (let (beg end done modes) | 1355 (let (beg end done modes) |
1352 (save-excursion | 1356 (save-excursion |
1353 (goto-char (point-min)) | 1357 (goto-char (point-min)) |
1354 (skip-chars-forward " \t\n") | 1358 (skip-chars-forward " \t\n") |
1355 (and enable-local-variables | 1359 (and enable-local-variables |
1360 local-enable-local-variables | |
1356 ;; Don't look for -*- if this file name matches any | 1361 ;; Don't look for -*- if this file name matches any |
1357 ;; of the regexps in inhibit-first-line-modes-regexps. | 1362 ;; of the regexps in inhibit-first-line-modes-regexps. |
1358 (let ((temp inhibit-first-line-modes-regexps) | 1363 (let ((temp inhibit-first-line-modes-regexps) |
1359 (name (if buffer-file-name | 1364 (name (if buffer-file-name |
1360 (file-name-sans-versions buffer-file-name) | 1365 (file-name-sans-versions buffer-file-name) |