]> code.delx.au - gnu-emacs/commitdiff
(normal-mode): Extend the scope of the `enable-local-variables'
authorLuc Teirlinck <teirllm@auburn.edu>
Thu, 12 May 2005 23:09:33 +0000 (23:09 +0000)
committerLuc Teirlinck <teirllm@auburn.edu>
Thu, 12 May 2005 23:09:33 +0000 (23:09 +0000)
binding to include the `set-auto-mode' call.
(magic-mode-alist): Doc fix.

lisp/files.el

index 99847b2f3fc8006989a5f7e1ccc38ce51a55ea10..e08381cdccb36eae38d222fae6f3ae89a381ce2d 100644 (file)
@@ -1728,10 +1728,10 @@ or from Lisp without specifying the optional argument FIND-FILE;
 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 @@ if REGEXP matches the text at the beginning of the buffer,
 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.