* globalized minor modes and major mode hooks
@ 2009-08-01 11:01 David Reitter
0 siblings, 0 replies; only message in thread
From: David Reitter @ 2009-08-01 11:01 UTC (permalink / raw
To: Emacs Development
Here's something that came up on the Emacs on OS X mailing list in
conjunction with an Aquamacs preview based on 23.1.
A user wanted to know how to turn off word wrapping just for latex.
Translated to GNU Emacs 23.1, this would be:
(add-hook 'latex-mode-hook
(defun turn-off-word-wrap () (setq word-wrap nil)))
As a normal setting, we also have:
(global-visual-line-mode 1)
Now, switching to LaTeX mode:
(latex-mode)
What should the value of word-wrap be?
I expected that the specific, local mode-hook setting would override
any global defaults defined by global-visual-line-mode. However, this
is not the case. word-wrap is t.
Two questions:
1. What is a good route for a user without intimate knowledge of Emacs
internals (specifically without knowing how global-visual-line-mode
does its job) to debug this?
2. I suspect that the define-globalized-minor-mode macro is at fault,
because the minor mode code is executed first (run-mode-hooks) before
the minor mode is configured. If this is true, can this be changed?
If not, how are users supposed to set something like word-wrap for a
major mode when the global mode is enabled?
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-08-01 11:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-01 11:01 globalized minor modes and major mode hooks David Reitter
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.