From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: mode in -*- line Date: Wed, 11 May 2005 21:09:17 -0500 (CDT) Message-ID: <200505120209.j4C29HK24648@raven.dms.auburn.edu> References: <200505072142.j47LgQO24114@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1115864060 1563 80.91.229.2 (12 May 2005 02:14:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 12 May 2005 02:14:20 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 12 04:14:16 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DW3DF-0008Ik-2b for ged-emacs-devel@m.gmane.org; Thu, 12 May 2005 04:14:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DW3M5-0003Tu-T0 for ged-emacs-devel@m.gmane.org; Wed, 11 May 2005 22:23:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DW3Ki-00034D-4d for emacs-devel@gnu.org; Wed, 11 May 2005 22:21:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DW3Ka-00030b-EO for emacs-devel@gnu.org; Wed, 11 May 2005 22:21:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DW3KZ-0002y4-Mo for emacs-devel@gnu.org; Wed, 11 May 2005 22:21:43 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DW3Fh-0005lC-O0; Wed, 11 May 2005 22:16:41 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id j4C29oog026078; Wed, 11 May 2005 21:09:50 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j4C29HK24648; Wed, 11 May 2005 21:09:17 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: rms@gnu.org In-reply-to: (message from Richard Stallman on Sun, 08 May 2005 18:45:59 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:37006 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:37006 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))) ============================================================