unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Remove toggling behavior of minor modes when called from elisp
@ 2007-12-09 18:53 Reiner Steib
  2008-01-05 13:40 ` Reiner Steib
  0 siblings, 1 reply; 8+ messages in thread
From: Reiner Steib @ 2007-12-09 18:53 UTC (permalink / raw)
  To: emacs-devel; +Cc: Stefan Monnier

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 <monnier@iro.umontreal.ca>
| Subject: Re: turn-on-*-mode
| Cc: emacs-devel@gnu.org, Miles Bader <miles@gnu.org>
| Date: Wed, 17 May 2006 17:24:49 -0400
| Message-ID: <jwvfyj8qrgq.fsf-monnier+emacs@gnu.org>
| To: rms@gnu.org
|
| >     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/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-01-07 11:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-09 18:53 Remove toggling behavior of minor modes when called from elisp Reiner Steib
2008-01-05 13:40 ` Reiner Steib
2008-01-06  8:09   ` Richard Stallman
2008-01-06  8:53     ` Reiner Steib
2008-01-06 18:09       ` Richard Stallman
2008-01-06 18:21         ` Reiner Steib
2008-01-06 20:22         ` Stefan Monnier
2008-01-07 11:31           ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).