aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Teirlinck2005-05-12 23:09:33 +0000
committerLuc Teirlinck2005-05-12 23:09:33 +0000
commit0fc205c63e853605b0af6af63fe7effff636f3df (patch)
tree6aa96de3f6f3bee9bae0d45c65113de404ac31b3
parent0cc615112c2973fb4b0235512391784f73a23b8f (diff)
downloademacs-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.el10
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;
1728in that case, this function acts as if `enable-local-variables' were t." 1728in 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,
1992to decide the buffer's major mode. 1992to decide the buffer's major mode.
1993 1993
1994If FUNCTION is nil, then it is not called. (That is a way of saying 1994If 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.