unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Chetan Pandya <pandyacus@sbcglobal.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>,
	Dan Nicolaescu <dann@ics.uci.edu>
Cc: Juri Linkov <juri@jurta.org>, Tom Tromey <tromey@redhat.com>,
	emacs-devel@gnu.org
Subject: Re: dir-locals.el take precedence over user's mode-hook changes
Date: Wed, 31 Dec 2008 15:50:07 -0800 (PST)	[thread overview]
Message-ID: <85555.70425.qm@web83204.mail.mud.yahoo.com> (raw)
In-Reply-To: <200812312141.mBVLflDN005631@mothra.ics.uci.edu>

--- On Wed, 12/31/08, Dan Nicolaescu <dann@ics.uci.edu> wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> 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






  reply	other threads:[~2008-12-31 23:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-24 18:31 dir-locals.el take precedence over user's mode-hook changes Stefan Monnier
2008-12-24 19:03 ` Dan Nicolaescu
2008-12-24 20:31   ` Tom Tromey
2008-12-24 20:52     ` Juri Linkov
2008-12-30 17:20       ` Stefan Monnier
2008-12-30 23:59         ` Juri Linkov
2008-12-31  1:43           ` Stefan Monnier
2008-12-31  1:54           ` Dan Nicolaescu
2008-12-31 12:28             ` Juri Linkov
2008-12-31 16:17               ` Dan Nicolaescu
2008-12-31 17:27                 ` Stefan Monnier
2008-12-31 21:41                   ` Dan Nicolaescu
2008-12-31 23:50                     ` Chetan Pandya [this message]
2009-01-03  0:45                       ` Juri Linkov
2008-12-31 16:39           ` Richard M Stallman
2008-12-25  4:49   ` Miles Bader

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85555.70425.qm@web83204.mail.mud.yahoo.com \
    --to=pandyacus@sbcglobal.net \
    --cc=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    --cc=juri@jurta.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).