diff options
| author | Luc Teirlinck | 2005-05-12 23:09:33 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2005-05-12 23:09:33 +0000 |
| commit | 0fc205c63e853605b0af6af63fe7effff636f3df (patch) | |
| tree | 6aa96de3f6f3bee9bae0d45c65113de404ac31b3 | |
| parent | 0cc615112c2973fb4b0235512391784f73a23b8f (diff) | |
| download | emacs-0fc205c63e853605b0af6af63fe7effff636f3df.tar.gz emacs-0fc205c63e853605b0af6af63fe7effff636f3df.zip | |
(normal-mode): Extend the scope of the `enable-local-variables'
binding to include the `set-auto-mode' call.
(magic-mode-alist): Doc fix.
| -rw-r--r-- | lisp/files.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/files.el b/lisp/files.el index 99847b2f3fc..e08381cdccb 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -1728,10 +1728,10 @@ or from Lisp without specifying the optional argument FIND-FILE; | |||
| 1728 | in that case, this function acts as if `enable-local-variables' were t." | 1728 | in that case, this function acts as if `enable-local-variables' were t." |
| 1729 | (interactive) | 1729 | (interactive) |
| 1730 | (or find-file (funcall (or default-major-mode 'fundamental-mode))) | 1730 | (or find-file (funcall (or default-major-mode 'fundamental-mode))) |
| 1731 | (report-errors "File mode specification error: %s" | 1731 | (let ((enable-local-variables (or (not find-file) enable-local-variables))) |
| 1732 | (set-auto-mode)) | 1732 | (report-errors "File mode specification error: %s" |
| 1733 | (report-errors "File local-variables error: %s" | 1733 | (set-auto-mode)) |
| 1734 | (let ((enable-local-variables (or (not find-file) enable-local-variables))) | 1734 | (report-errors "File local-variables error: %s" |
| 1735 | (hack-local-variables))) | 1735 | (hack-local-variables))) |
| 1736 | (if (fboundp 'ucs-set-table-for-input) ; don't lose when building | 1736 | (if (fboundp 'ucs-set-table-for-input) ; don't lose when building |
| 1737 | (ucs-set-table-for-input))) | 1737 | (ucs-set-table-for-input))) |
| @@ -1992,7 +1992,7 @@ if REGEXP matches the text at the beginning of the buffer, | |||
| 1992 | to decide the buffer's major mode. | 1992 | to decide the buffer's major mode. |
| 1993 | 1993 | ||
| 1994 | If FUNCTION is nil, then it is not called. (That is a way of saying | 1994 | If FUNCTION is nil, then it is not called. (That is a way of saying |
| 1995 | \"allow `auto-mode-alist' to decide for these files.") | 1995 | \"allow `auto-mode-alist' to decide for these files.)") |
| 1996 | 1996 | ||
| 1997 | (defun set-auto-mode (&optional keep-mode-if-same) | 1997 | (defun set-auto-mode (&optional keep-mode-if-same) |
| 1998 | "Select major mode appropriate for current buffer. | 1998 | "Select major mode appropriate for current buffer. |