emacs-devel
[Top][All Lists]
Advanced

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

Re: turning on minor modes from hooks


From: Richard Stallman
Subject: Re: turning on minor modes from hooks
Date: Tue, 01 Sep 2009 17:20:23 -0400

    > When you call a major mode function, it selects that mode.
    > So when users call a minor mode function, they will expect it
    > to select that mode too.

    So you argue for "turn it on" rather than "toggle".

Not necessarily.  This case should't be considered in isolation but
rather as part of an overall design for minor modes.

One design that occurs to me is (foo-mode) turns it on, (foo-mode t)
turns it on, (foo-mode nil) turns it off, and the way you toggle is
(foo-mode (not foo-mode)).

Another is (foo-mode) toggles, (foo-mode t) turns it on, (foo-mode
nil) turns it off.

I am not sure which of those is better.  I don't think we should
reject either out of hand.

The current convention for interactive calls seems clear and natural
so I think it should be preserved, whatever we do with calls from Lisp.





reply via email to

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