[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: |
Juri Linkov |
Subject: |
Re: dir-locals.el take precedence over user's mode-hook changes |
Date: |
Wed, 31 Dec 2008 01:59:03 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) |
> So rather than "just" switch the order, we need to find a way for the
> user to be able to cleanly specify which behavior he wants on a case by
> case basis.
Maybe something like
;; Pre-Local Variables:
;; End:
for variables set before mode hook or
;; Post-Local Variables:
;; End:
after mode hook.
>> `bug-reference-url-format' set in Local Variables to the string
>> "http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=%s"
>> (BTW, this file-local variable should be moved to .dir-locals.el)
>
> Could you explain why you think it should be in dir-locals rather than
> in the file?
In the Emacs tree we have more than 50 ChangeLog files and counting.
Many ChangeLog entries refer to the bug database and repeat the same
setting:
;; bug-reference-url-format:
"http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=%s"
Since this setting is project-wide it is better to have it in one place.
So e.g. later after changing the url only one place needs to be changing.
>> And when I try to enable `bug-reference-mode' using the following hook:
>> (add-hook 'change-log-mode-hook 'bug-reference-mode)
>> it never gets enabled because `bug-reference-mode' tests whether
>> a variable `bug-reference-url-format' is non-nil before enabling this mode,
>> and this variable is not yet set because it gets initialized later in
>> `hack-local-variables'.
>
> Please report this bug.
Done. (Bug#1744)
--
Juri Linkov
http://www.jurta.org/emacs/
- dir-locals.el take precedence over user's mode-hook changes, Stefan Monnier, 2008/12/24
- Re: dir-locals.el take precedence over user's mode-hook changes, Dan Nicolaescu, 2008/12/24
- 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 <=
- 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, 2008/12/31
- 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