[Top][All Lists]

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

Re: turning on minor modes from hooks

From: Miles Bader
Subject: Re: turning on minor modes from hooks
Date: Sun, 30 Aug 2009 08:18:46 +0900

Dan Nicolaescu <address@hidden> writes:
> (add-hook 'text-mode-hook   'auto-fill-mode)
> This avoids defining extra functions just for the purpose of being able
> to call them from hooks.
> Not sure how feasible is to have a clean implementation of such a feature...

Stephen has long advocated that non-interactive invocation of mode
commands should always turn on the mode instead of toggling.

I agree with that:  I think the vast majority of uses in code do not use
the toggling anyway, and while there probably are a few uses which would
be broken by such a change, I think there would be far _more_
currently-incorrect uses that would be _fixed_ by such a change (where
someone uses (add-hook 'foo-hook 'ack-mode) not realizing that it really
toggles instead of turning on).


Acquaintance, n. A person whom we know well enough to borrow from, but not
well enough to lend to.

reply via email to

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