On Fri, Nov 28 2008, Stephen J. Turnbull wrote:
Reiner Steib writes:
> The justification for turn-on-... (and turn-off-...) is/was that is
> simplifies adding it to a hook:
> (add-hook 'text-mode-hook 'turn-on-auto-fill)
Of course; this use is isomorphic to the one in file variables, which
is just a form of local hook, after all.
Yes, but using turn-on-... in hooks seem much more common to me, YMMV.
So with a galaxy of minor modes we add `turn-on-foo' and even
rarely `turn-off-foo' commands only when users complain about a
particular one, is that it?
Richard's recommendation was:
| So my idea is, let's add such functions for the modes people often
| want to enable in these hooks.
This is an ugly hack. I can think of many generic ways to deal with
it. For example, add-hook (or run-hooks!) could do [...]
If that's too much magic for one's taste, then we could update
define-minor-mode to always generate the "turn-on/off-" forms.
I like Stefan's idea (dunno if it has been implemented in the
| Stefan had a (what I thought was) clever suggestion to deal with this:
| Make "...-mode" functions toggle only when used interactively (just as
| they only print a message when used interactively), and otherwise have
| them just enable the state unconditionally.
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
XEmacs-Beta mailing list