emacs-devel
[Top][All Lists]
Advanced

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

Remove toggling behavior of minor modes when called from elisp


From: Reiner Steib
Subject: Remove toggling behavior of minor modes when called from elisp
Date: Sun, 09 Dec 2007 19:53:48 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

Hi,

after the discussion cited below, this TODO item had been added:

** Remove the default toggling behavior of minor modes when called from elisp
rather than interactively.  This a trivial one-liner in easy-mode.el.

Could this code be installed now?

,----[ <http://thread.gmane.org/gmane.emacs.devel/54509/focus=54665> ]
| From: Stefan Monnier <address@hidden>
| Subject: Re: turn-on-*-mode
| Cc: address@hidden, Miles Bader <address@hidden>
| Date: Wed, 17 May 2006 17:24:49 -0400
| Message-ID: <address@hidden>
| To: address@hidden
|
| >     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.
| 
| > This is an interesting idea.
| 
| > It would mean that there is no longer an argument you could use,
| > noninteractively, to toggle the mode.
| 
| Actually there is: the symbol `toggle' does it.
| 
| > Another drawback is simply that the interactive and noninteractive
| > behavior of these commands will be different.
| 
| Not really.  It just means that the argument passed to the minor mode
| function in the absence of a prefix-arg won't be nil but will be `toggle'.
| As a matter of fact, this is already the case.
| 
| The current code already emits a warning when the minor mode is called with
| a nil argument and the minor mode is already enabled (i.e. when a nil
| argument is used to toggle the mode off).
`----

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




reply via email to

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