[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: turn-on-*-mode
From: |
Stefan Monnier |
Subject: |
Re: turn-on-*-mode |
Date: |
Wed, 17 May 2006 17:24:49 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> 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).
Stefan
- Re: turn-on-*-mode, (continued)
- Re: turn-on-*-mode, Richard Stallman, 2006/05/16
- Re: turn-on-*-mode, Richard Stallman, 2006/05/16
- Re: turn-on-*-mode, Reiner Steib, 2006/05/30
- Re: turn-on-*-mode, Sam Steingold, 2006/05/30
- Re: turn-on-*-mode, Reiner Steib, 2006/05/30
- Re: turn-on-*-mode, Reiner Steib, 2006/05/16
- Re: turn-on-*-mode, Miles Bader, 2006/05/16
- Re: turn-on-*-mode, Richard Stallman, 2006/05/17
- Re: turn-on-*-mode,
Stefan Monnier <=
- Re: turn-on-*-mode, Richard Stallman, 2006/05/18
- Re: turn-on-*-mode, Stefan Monnier, 2006/05/18
- Re: turn-on-*-mode, Kevin Rodgers, 2006/05/16
- Re: turn-on-*-mode, Stefan Monnier, 2006/05/17