emacs-devel
[Top][All Lists]
Advanced

[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, 24 Dec 2008 22:52:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu)

> Dan> If the user really really wants to override the settings doesn't
> Dan> rm .dir-locals.el
> Dan> or
> Dan> changing the contents of .dir-locals.el
> Dan> work well enough?
>
> My intent was for projects to check these into version control.
> So, removing them is not always ok.
>
> As I recall you can set up your own local definition for a project to
> override the project's file, though.  This is somewhat inconvenient,
> but it ought to work.

I agree with Stefan that the current order of calling a hook and
setting local variables (either dired-local or file-local) is wrong.

Another problem with the current order is that it is impossible to use
`bug-reference-mode' on ChangeLog files.  We already have a local variable
`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)

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'.

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]