From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.devel Subject: Re: Remove toggling behavior of minor modes when called from elisp Date: Sat, 05 Jan 2008 14:40:02 +0100 Message-ID: References: Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1199540462 19975 80.91.229.12 (5 Jan 2008 13:41:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Jan 2008 13:41:02 +0000 (UTC) Cc: Stefan Monnier To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 05 14:41:22 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JB9H6-0005om-Vh for ged-emacs-devel@m.gmane.org; Sat, 05 Jan 2008 14:41:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JB9Gk-00007Y-D5 for ged-emacs-devel@m.gmane.org; Sat, 05 Jan 2008 08:40:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JB9Gg-00006h-Du for emacs-devel@gnu.org; Sat, 05 Jan 2008 08:40:54 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JB9Ge-00005h-Hw for emacs-devel@gnu.org; Sat, 05 Jan 2008 08:40:53 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JB9Ge-00005d-A6 for emacs-devel@gnu.org; Sat, 05 Jan 2008 08:40:52 -0500 Original-Received: from mail.uni-ulm.de ([134.60.1.11]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JB9Gc-0005xt-SO for emacs-devel@gnu.org; Sat, 05 Jan 2008 08:40:51 -0500 Original-Received: from bridgekeeper.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.41.37]) by mail.uni-ulm.de (8.14.2/8.14.2) with ESMTP id m05DekcS001108; Sat, 5 Jan 2008 14:40:47 +0100 (MET) Original-Received: from localhost (bridgekeeper.physik.uni-ulm.de [134.60.41.37]) by bridgekeeper.physik.uni-ulm.de (Postfix) with ESMTP id C77691C50B; Sat, 5 Jan 2008 14:40:46 +0100 (CET) X-Face: 1; h7XMU[7l}$T@J.D}5z*w8Tg'}B5ArAWc8>2X~otB; kOjKs8X%|hTC#dG:%Vpx")x7S/`v :VXU#fZW$X$zdhEU.RfVQ@<-m9IuN{Hm"fW{,5]6kR'M*vEs+{5Cj!L(JTRzA$(},?5J=sm; %Od, Stefan Monnier In-Reply-To: (Reiner Steib's message of "Sun, 09 Dec 2007 19:53:48 +0100") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) X-DCC-CTc-dcc1-Metrics: poseidon 1030; Body=2 Fuz1=2 Fuz2=2 X-Virus-Scanned: by amavisd-new X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:86153 Archived-At: 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? > > ,----[ ] > | From: Stefan Monnier > | Subject: Re: turn-on-*-mode > | Cc: emacs-devel@gnu.org, Miles Bader > | Date: Wed, 17 May 2006 17:24:49 -0400 > | Message-ID: > | 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/