From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#4102: 23.1.50; recentf-mode nil but toggles Date: Wed, 12 Aug 2009 21:15:41 -0700 Message-ID: References: <04855577A772452A99C5FBCB8078CE4D@xahPC> <2F116E10862F449E8FE250395BB55937@xahPC> <26d7a64b-c393-42b9-bacf-8a9e6c62eadd@f20g2000prn.googlegroups.com> Reply-To: Drew Adams , 4102@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1250137637 8331 80.91.229.12 (13 Aug 2009 04:27:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Aug 2009 04:27:17 +0000 (UTC) To: "'Xah Lee'" , Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 13 06:27:04 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MbRu2-0006j6-Eg for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Aug 2009 06:27:03 +0200 Original-Received: from localhost ([127.0.0.1]:55105 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbRtz-0003Zx-Qz for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Aug 2009 00:26:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MbRtv-0003XN-D1 for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2009 00:26:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MbRtr-0003Vs-Vb for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2009 00:26:55 -0400 Original-Received: from [199.232.76.173] (port=56811 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbRtr-0003Vp-OG for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2009 00:26:51 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:60986) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MbRtr-0004DV-5F for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2009 00:26:51 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7D4QniZ023940; Wed, 12 Aug 2009 21:26:49 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n7D4P44B023639; Wed, 12 Aug 2009 21:25:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: "Drew Adams" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 13 Aug 2009 04:25:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4102 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125013695622403 (code B ref -1); Thu, 13 Aug 2009 04:25:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 13 Aug 2009 04:15:56 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7D4FsTE022400 for ; Wed, 12 Aug 2009 21:15:56 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MbRjG-0007BO-Hw for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2009 00:15:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MbRjB-0007Ax-55 for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2009 00:15:53 -0400 Original-Received: from [199.232.76.173] (port=59503 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbRjA-0007Au-U7 for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2009 00:15:48 -0400 Original-Received: from rcsinet11.oracle.com ([148.87.113.123]:16666 helo=rgminet11.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MbRjA-0002Ux-JE for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2009 00:15:48 -0400 Original-Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rgminet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n7D4FqwT027464 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 13 Aug 2009 04:15:54 GMT Original-Received: from abhmt004.oracle.com (abhmt004.oracle.com [141.146.116.13]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n7D4FjnH002635; Thu, 13 Aug 2009 04:15:45 GMT Original-Received: from dradamslap1 (/141.144.168.24) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 12 Aug 2009 21:15:42 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <26d7a64b-c393-42b9-bacf-8a9e6c62eadd@f20g2000prn.googlegroups.com> Thread-Index: AcobvpfrYmaLUXvcTdCbsIXQ8JEBwAADEJbQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: abhmt004.oracle.com [141.146.116.13] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A010203.4A83936F.00D1:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Thu, 13 Aug 2009 00:26:55 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:30144 Archived-At: > Is there somewhere in elisp manual that > explicitly explains/warns that commands that turn minor mode on/off > stick to 1 and 0 and consider t and nil not acceptable argument? (elisp) Minor Mode Conventions: * Define a command whose name is the same as the mode variable. Its job is to enable and disable the mode by setting the variable. The command should accept one optional argument. If the argument is `nil', it should toggle the mode (turn it on if it is off, and off if it is on). It should turn the mode on if the argument is a positive integer, the symbol `t', or a list whose CAR is one of those. It should turn the mode off if the argument is a negative integer or zero, the symbol `-', or a list whose CAR is a negative integer or zero. The meaning of other arguments is not specified. Here is an example taken from the definition of `transient-mark-mode'. It shows the use of `transient-mark-mode' as a variable that enables or disables the mode's behavior, and also shows the proper way to toggle, enable or disable the minor mode based on the raw prefix argument value. (setq transient-mark-mode (if (null arg) (not transient-mark-mode) (> (prefix-numeric-value arg) 0))) Any positive integer is the same as 1. Any negative integer is the same as 0. t is the same as 1. `-' is the same as 0. (4) is the same as 1. (-4) is the same as 0. (0) is the same as 0. (t) is the same as 1. (nil) and (-): behavior not conventionally defined nil always toggles. It lets you do just `M-x foo' to toggle (the most common change). You can do `C-u M-x foo' or `C-9 M-x foo' to turn it on and `C-- M-x foo' to turn it off. etc.