[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dir-locals.el take precedence over user's mode-hook changes
From: |
Chetan Pandya |
Subject: |
Re: dir-locals.el take precedence over user's mode-hook changes |
Date: |
Wed, 31 Dec 2008 15:50:07 -0800 (PST) |
--- On Wed, 12/31/08, Dan Nicolaescu <address@hidden> wrote:
> Stefan Monnier <address@hidden> 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
- Re: dir-locals.el take precedence over user's mode-hook changes, (continued)
- Re: dir-locals.el take precedence over user's mode-hook changes, Tom Tromey, 2008/12/24
- Re: dir-locals.el take precedence over user's mode-hook changes, Juri Linkov, 2008/12/24
- Re: dir-locals.el take precedence over user's mode-hook changes, Stefan Monnier, 2008/12/30
- Re: dir-locals.el take precedence over user's mode-hook changes, Juri Linkov, 2008/12/30
- Re: dir-locals.el take precedence over user's mode-hook changes, Stefan Monnier, 2008/12/30
- Re: dir-locals.el take precedence over user's mode-hook changes, Dan Nicolaescu, 2008/12/30
- Re: dir-locals.el take precedence over user's mode-hook changes, Juri Linkov, 2008/12/31
- Re: dir-locals.el take precedence over user's mode-hook changes, Dan Nicolaescu, 2008/12/31
- Re: dir-locals.el take precedence over user's mode-hook changes, Stefan Monnier, 2008/12/31
- Re: dir-locals.el take precedence over user's mode-hook changes, Dan Nicolaescu, 2008/12/31
- Re: dir-locals.el take precedence over user's mode-hook changes,
Chetan Pandya <=
- Re: dir-locals.el take precedence over user's mode-hook changes, Richard M Stallman, 2008/12/31
Re: dir-locals.el take precedence over user's mode-hook changes, Miles Bader, 2008/12/24