# HG changeset patch # User Luc Teirlinck # Date 1115939373 0 # Node ID 50bb635a0522789176d2f4fa2e729fe09cf16155 # Parent 2047356fac4e692e77c41f28dfbac8bfe533c72c (normal-mode): Extend the scope of the `enable-local-variables' binding to include the `set-auto-mode' call. (magic-mode-alist): Doc fix. diff -r 2047356fac4e -r 50bb635a0522 lisp/files.el --- a/lisp/files.el Thu May 12 23:07:24 2005 +0000 +++ b/lisp/files.el Thu May 12 23:09:33 2005 +0000 @@ -1728,10 +1728,10 @@ in that case, this function acts as if `enable-local-variables' were t." (interactive) (or find-file (funcall (or default-major-mode 'fundamental-mode))) - (report-errors "File mode specification error: %s" - (set-auto-mode)) - (report-errors "File local-variables error: %s" - (let ((enable-local-variables (or (not find-file) enable-local-variables))) + (let ((enable-local-variables (or (not find-file) enable-local-variables))) + (report-errors "File mode specification error: %s" + (set-auto-mode)) + (report-errors "File local-variables error: %s" (hack-local-variables))) (if (fboundp 'ucs-set-table-for-input) ; don't lose when building (ucs-set-table-for-input))) @@ -1992,7 +1992,7 @@ to decide the buffer's major mode. If FUNCTION is nil, then it is not called. (That is a way of saying -\"allow `auto-mode-alist' to decide for these files.") +\"allow `auto-mode-alist' to decide for these files.)") (defun set-auto-mode (&optional keep-mode-if-same) "Select major mode appropriate for current buffer.