emacs-devel
[Top][All Lists]
Advanced

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

Re: Remove toggling behavior of minor modes when called from elisp


From: Reiner Steib
Subject: Re: Remove toggling behavior of minor modes when called from elisp
Date: Sat, 05 Jan 2008 14:40:02 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

Hi,

I didn't see any reply to the suggestion below yet.

On Sun, Dec 09 2007, Reiner Steib wrote:
> 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]