unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Reiner Steib <reinersteib+gmane@imap.cc>
To: <emacs-devel@gnu.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Remove toggling behavior of minor modes when called from elisp
Date: Sun, 09 Dec 2007 19:53:48 +0100	[thread overview]
Message-ID: <v9r6hvzolf.fsf@marauder.physik.uni-ulm.de> (raw)

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/

             reply	other threads:[~2007-12-09 18:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-09 18:53 Reiner Steib [this message]
2008-01-05 13:40 ` Remove toggling behavior of minor modes when called from elisp 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=v9r6hvzolf.fsf@marauder.physik.uni-ulm.de \
    --to=reinersteib+gmane@imap.cc \
    --cc=Reiner.Steib@gmx.de \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).