emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mode in -*- line


From: Luc Teirlinck
Subject: Re: mode in -*- line
Date: Wed, 11 May 2005 21:09:17 -0500 (CDT)

Richard Stallman wrote:

       Firstly, if normal-mode is called interactively, it unconditionally
       processes all local variables in the -*- line and the local variables
       list _except_ that it ignores a mode in the -*- line if
       enable-local-variables is nil.  I guess that this exception is
       unintentional.  If so, it is easy to fix.

   I think that is a bug--please do fix it.

What about the following patch, which fixes the problem?  I can
install if desired.

===File ~/files-diff========================================
*** files.el    11 May 2005 15:00:33 -0500      1.766
--- files.el    11 May 2005 18:44:09 -0500      
***************
*** 1728,1737 ****
  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)))
        (hack-local-variables)))
    (if (fboundp 'ucs-set-table-for-input) ; don't lose when building
        (ucs-set-table-for-input)))
--- 1728,1737 ----
  in that case, this function acts as if `enable-local-variables' were t."
    (interactive)
    (or find-file (funcall (or default-major-mode 'fundamental-mode)))
!   (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)))
============================================================




reply via email to

[Prev in Thread] Current Thread [Next in Thread]