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: Dan Nicolaescu
Subject: Re: dir-locals.el take precedence over user's mode-hook changes
Date: Tue, 30 Dec 2008 17:54:05 -0800 (PST)

Juri Linkov <address@hidden> writes:

  > > 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 would be even nicer to be able to turn on this minor mode in
.dir-locals.el which together with setting bug-reference-url-format to
the right value, would make this feature work for everyone by default
with not .emacs changes.
Same goes about being able to turn on minor modes in using "Local Variables".




reply via email to

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