emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: turn-on-*-mode


From: Sam Steingold
Subject: Re: turn-on-*-mode
Date: Tue, 16 May 2006 11:04:59 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> * Kim F. Storm <address@hidden> [2006-05-16 16:52:51 +0200]:
>
> And for non-interactive use, doing (*-mode 1) and (*-mode -1) is the
> preferred interface.
> There are also a number of "toggle-" functions, which IMO is a much
> better interface (just one function, with a simple common prefix).

I think I should have been more clear about the background.
Yes, in a program, (*-mode *) is better.
Yes, interactively, M-x *-mode is better.

The only situation where the turn-on-*-mode functions are really needed
is hooks:
   (add-hook 'text-mode-hook 'turn-on-auto-fill)
is much better than
   (add-hook 'text-mode-hook (lambda () (auto-fill-mode 1)))

Maybe minor modes that are commonly enabled from hooks should have their
turn-on-* versions?

-- 
Sam Steingold (http://www.podval.org/~sds) on Fedora Core release 5 (Bordeaux)
http://jihadwatch.org http://iris.org.il http://palestinefacts.org
http://pmw.org.il http://memri.org http://dhimmi.com http://ffii.org
If you know that you know nothing, you know too much.





reply via email to

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