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, 31 Dec 2008 14:28:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu)

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

It's already possible to turn on minor modes in "Local Variables" using the
`mode' tag:

;; bug-reference-url-format: 
"http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=%s";
;; mode: bug-reference

and I can confirm that with the right order as above it correctly enables
bug-reference-mode minor mode.  It also works with .dir-locals.el like

((change-log-mode .
  ((add-log-time-zone-rule . t)
   (fill-column . 74)
   (bug-reference-url-format .
    "http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=%s";)
   (mode . bug-reference))))

This might be suitable for the Emacs project.  But I can't say if it is
acceptable as a general solution.  If yes, then we should document the fact
that setting `bug-reference-url-format' in "Local Variables" also requires
enabling the corresponding minor mode later in the same place.

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




reply via email to

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