From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chetan Pandya Newsgroups: gmane.emacs.devel Subject: Re: dir-locals.el take precedence over user's mode-hook changes Date: Wed, 31 Dec 2008 15:50:07 -0800 (PST) Message-ID: <85555.70425.qm@web83204.mail.mud.yahoo.com> References: <200812312141.mBVLflDN005631@mothra.ics.uci.edu> Reply-To: pandyacus@sbcglobal.net NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1230767433 1368 80.91.229.12 (31 Dec 2008 23:50:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 31 Dec 2008 23:50:33 +0000 (UTC) Cc: Juri Linkov , Tom Tromey , emacs-devel@gnu.org To: Stefan Monnier , Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 01 00:51:39 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LIAqc-0003I1-Bw for ged-emacs-devel@m.gmane.org; Thu, 01 Jan 2009 00:51:34 +0100 Original-Received: from localhost ([127.0.0.1]:51883 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LIApN-0000i5-Qe for ged-emacs-devel@m.gmane.org; Wed, 31 Dec 2008 18:50:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LIApI-0000eu-Ee for emacs-devel@gnu.org; Wed, 31 Dec 2008 18:50:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LIApH-0000d3-3P for emacs-devel@gnu.org; Wed, 31 Dec 2008 18:50:12 -0500 Original-Received: from [199.232.76.173] (port=55843 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LIApG-0000cv-UM for emacs-devel@gnu.org; Wed, 31 Dec 2008 18:50:10 -0500 Original-Received: from web83204.mail.mud.yahoo.com ([216.252.101.48]:39928) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1LIApG-0006G0-H9 for emacs-devel@gnu.org; Wed, 31 Dec 2008 18:50:10 -0500 Original-Received: (qmail 71953 invoked by uid 60001); 31 Dec 2008 23:50:08 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Message-ID; b=HO41c4PepZMzs6HlQl/4fMUQmS08Mwv4Lv86ysQlOqB4kjkqHYbahp9iU9P8h3FLxPOyPyXk1FQMHCnBRKElpwDBV1kPZediLSgOn60dtbj/sHxNfJ1yekSlmj00g6wc6P9vsv3BjK5+Nhv8ormsEf/fyAjdP6nt5TWTviaG6Ok=; X-YMail-OSG: br3AaJUVM1nWw4ygh7KENvAuc0Gea6480JNSH7CB2z_W7o2Wh72Wut0zH2QOZmmb53zVCvQ1UtlK2s5jwvwKzF3fUCZtGoBE_WDTPMaTb4WvzgIe1IdOEBBH9WveWNYANYnpsDfB4B8RnEghGTEyruc7Yjx3xE2lICni0iuuydozq_z8xI0ID83Xpgyu5lVOIaZrs4c08vFlIpo8zEc- Original-Received: from [75.36.180.230] by web83204.mail.mud.yahoo.com via HTTP; Wed, 31 Dec 2008 15:50:07 PST X-Mailer: YahooMailWebService/0.7.218.2 In-Reply-To: <200812312141.mBVLflDN005631@mothra.ics.uci.edu> X-detected-operating-system: by monty-python.gnu.org: FreeBSD 6.x (1) 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:107488 Archived-At: --- On Wed, 12/31/08, Dan Nicolaescu wrote: > Stefan Monnier writes: > > > > Unfortunately this does not work, it would turn the mode off if > > > it's already turned on. > > > > > If you have in your .emacs: > > > > > (add-hook 'emacs-lisp-mode-hook 'my-emacs-lisp-mode-hook) > > > (defun my-emacs-lisp-mode-hook () > (auto-fill-mode 1)) > > > > > And add to an elisp file: > > > > > ;; Local Variables: > > > ;; mode: auto-fill > > > ;; End: > > > > > auto-fill-mode will not be turned on for that elisp file. > > > > Yes, that's a more general problem. I'd be inclined to change it so > > that the minor mode is unconditionally turned ON rather than toggled. > > Please do that, this is a long standing issue... Isn't this going against what the documentation says? Minor modes are supposed to be preferences and the user may or may not want those modes turned on automatically. It looks like the first mode line entry is treated as major mode and the subsequent ones as minor mode. Specifying this in the local variables section has the potential to set the major mode twice - first using set-auto-mode and then when the local variables section is processed. Given the problem with bug-reference-mode and such, it makes sense to change the way settings are processed. I have some ideas on this, but WDYT? (Obviously, there is a question of compatibility with existing behavior, but that doesn't seem to be a big issue with other features). Chetan