[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: Tue, 01 Sep 2009 07:15:53 +0900

Stefan Monnier <address@hidden> writes:
>> A call with no arguments, as in (auto-save-mode), naturally ought to
>> toggle the mode or turn it on.
> Care to explain why?

Note that he said "or turn it on"; I think the point was to distinguish
those possibilities from "unconditionally turn it off".

Probably most programmers would agree that having (foo-mode)
unconditionally disable foo-mode would be pretty weird...!  Having
(foo-mode nil) turn it on or toggle is actually a bit weird too, though
a bit less so...

Using &rest  is generally not a good idea because it conses,
but... since mode functions are generally not called in inner loops,
maybe it would be OK for this case...?

[It would be nice if elisp supported cheap non-nil defaults for
&optional args...]


Accordion, n. An instrument in harmony with the sentiments of an assassin.

reply via email to

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