From: Juri Linkov <juri@jurta.org>
To: Dan Nicolaescu <dann@ics.uci.edu>
Cc: Tom Tromey <tromey@redhat.com>,
Stefan Monnier <monnier@iro.umontreal.ca>,
emacs-devel@gnu.org
Subject: Re: dir-locals.el take precedence over user's mode-hook changes
Date: Wed, 31 Dec 2008 14:28:07 +0200 [thread overview]
Message-ID: <87hc4kmu4c.fsf@jurta.org> (raw)
In-Reply-To: <200812310154.mBV1s5at001247@mothra.ics.uci.edu> (Dan Nicolaescu's message of "Tue, 30 Dec 2008 17:54:05 -0800 (PST)")
> > >> 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/
next prev parent reply other threads:[~2008-12-31 12:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-24 18:31 dir-locals.el take precedence over user's mode-hook changes Stefan Monnier
2008-12-24 19:03 ` Dan Nicolaescu
2008-12-24 20:31 ` Tom Tromey
2008-12-24 20:52 ` Juri Linkov
2008-12-30 17:20 ` Stefan Monnier
2008-12-30 23:59 ` Juri Linkov
2008-12-31 1:43 ` Stefan Monnier
2008-12-31 1:54 ` Dan Nicolaescu
2008-12-31 12:28 ` Juri Linkov [this message]
2008-12-31 16:17 ` Dan Nicolaescu
2008-12-31 17:27 ` Stefan Monnier
2008-12-31 21:41 ` Dan Nicolaescu
2008-12-31 23:50 ` Chetan Pandya
2009-01-03 0:45 ` Juri Linkov
2008-12-31 16:39 ` Richard M Stallman
2008-12-25 4:49 ` Miles Bader
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87hc4kmu4c.fsf@jurta.org \
--to=juri@jurta.org \
--cc=dann@ics.uci.edu \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=tromey@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.