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: Remove toggling behavior of minor modes when called from elisp Date: Sun, 09 Dec 2007 19:53:48 +0100 Message-ID: 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 1197226540 17121 80.91.229.12 (9 Dec 2007 18:55:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Dec 2007 18:55:40 +0000 (UTC) Cc: Stefan Monnier To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 09 19:55:49 2007 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 1J1RJc-0007px-2K for ged-emacs-devel@m.gmane.org; Sun, 09 Dec 2007 19:55:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J1RJK-0002Gp-MB for ged-emacs-devel@m.gmane.org; Sun, 09 Dec 2007 13:55:30 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J1RIv-00026w-KA for emacs-devel@gnu.org; Sun, 09 Dec 2007 13:55:05 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J1RIt-000260-US for emacs-devel@gnu.org; Sun, 09 Dec 2007 13:55:05 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J1RIt-00025t-Qw for emacs-devel@gnu.org; Sun, 09 Dec 2007 13:55:03 -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 1J1RIs-0000PP-7O for emacs-devel@gnu.org; Sun, 09 Dec 2007 13:55:03 -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 lB9Isw6R014356; Sun, 9 Dec 2007 19:54:58 +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 0591412DD1; Sun, 9 Dec 2007 19:54:57 +0100 (CET) X-Face: .*T0'iU(sujq_j9\J>-d4fg; N/1++U#U$_5ii6k.=|"-n'?5O:Hyz&wi'-!I~,}7~GgT=0S /&-R5sbkNy5+Xo1y{Tw2KKxi@Xh"g@]Qc|.U<*]WDd)qvGowFDvfU1F]{EDho:7P0@|oOD=Bc{K4?> WP68K[Mx:}=`ZT'6g4'f+g?;`vri2!)xGy}3:=l'(/Cea0l4lo^H5#@/Z3ev Mail-Followup-To: , Stefan Monnier User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-DCC-URT-Metrics: poseidon 1060; 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:84925 Archived-At: 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? ,----[ ] | 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/