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: Wed, 31 Dec 2008 08:17:10 -0800 (PST)

Juri Linkov <address@hidden> writes:

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

Unfortunately this does not work, it would turn the mode off if it's
already turned on.  

If you have in your .emacs:

(add-hook 'emacs-lisp-mode-hook 'my-emacs-lisp-mode-hook)
(defun my-emacs-lisp-mode-hook ()   (auto-fill-mode 1))

And add to an elisp file:

;; Local Variables:
;; mode: auto-fill
;; End:

auto-fill-mode will not be turned on for that elisp file.




reply via email to

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