From unknown Fri Jun 20 20:10:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10909: 24.0.94; doc of `define-minor-mode' Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Feb 2012 02:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10909 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 10909@debbugs.gnu.org X-Debbugs-Original-To: Received: via spool by submit@debbugs.gnu.org id=B.133048413128193 (code B ref -1); Wed, 29 Feb 2012 02:56:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Feb 2012 02:55:31 +0000 Received: from localhost ([127.0.0.1]:54956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S2ZhS-0007KU-T4 for submit@debbugs.gnu.org; Tue, 28 Feb 2012 21:55:31 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55005) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S2ZhH-0007K8-EF for submit@debbugs.gnu.org; Tue, 28 Feb 2012 21:55:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2Zgz-0001H6-Hm for submit@debbugs.gnu.org; Tue, 28 Feb 2012 21:55:02 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:39430) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2Zgz-0001Fu-Dq for submit@debbugs.gnu.org; Tue, 28 Feb 2012 21:55:01 -0500 Received: from eggs.gnu.org ([208.118.235.92]:59502) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2Zgx-00083G-Kl for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2012 21:55:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2Zgv-0001CY-EX for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2012 21:54:58 -0500 Received: from acsinet15.oracle.com ([141.146.126.227]:32872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2Zgv-0001BH-8O for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2012 21:54:57 -0500 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q1T2srCf005397 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 29 Feb 2012 02:54:54 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q1T2srTB006742 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 29 Feb 2012 02:54:53 GMT Received: from abhmt103.oracle.com (abhmt103.oracle.com [141.146.116.55]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q1T2srDi023648 for ; Tue, 28 Feb 2012 20:54:53 -0600 Received: from dradamslap1 (/10.159.42.251) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 28 Feb 2012 18:54:52 -0800 From: "Drew Adams" Date: Tue, 28 Feb 2012 18:54:47 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: Acz2jX8aj4euog+7TJqxtjzjTSwxzA== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090203.4F4D937E.006C,ss=1,re=0.000,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: 0.8 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) The doc says that the mode function that gets defined accepts an optional argument. The interactive description is OK. The non-interactive description says only "When called from Lisp, it enables the mode if the argument is omitted or nil, and toggles the mode if the argument is `toggle'." IOW, it says nothing about what happens when an arg is passed that is not nil or omitted or `toggle'. And I've seen at least one user try to use `(foo-mode t)'. It turns out that that has the same effect as `(foo-mode 1)', but nothing in the doc says that it should. The doc should, at a minimum, say what kinds of non-nil arguments it expects (e.g. integer). Personally, I think it should probably go beyond that and say also what it does with other non-nil args, but that's your call. In GNU Emacs 24.0.94.1 (i386-mingw-nt5.1.2600) of 2012-02-26 on MARVIN Windowing system distributor `Microsoft Corp.', version 5.1.2600 Configured using: `configure --with-gcc (4.6) --no-opt --enable-checking --cflags -ID:/devel/emacs/libs/libXpm-3.5.8/include -ID:/devel/emacs/libs/libXpm-3.5.8/src -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include -ID:/devel/emacs/libs/giflib-4.1.4-1/include -ID:/devel/emacs/libs/jpeg-6b-4/include -ID:/devel/emacs/libs/tiff-3.8.2-1/include -ID:/devel/emacs/libs/gnutls-3.0.9/include' From unknown Fri Jun 20 20:10:21 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: "Drew Adams" Subject: bug#10909: closed (Re: bug#10909: 24.0.94; doc of `define-minor-mode') Message-ID: References: <87y5k2dqpk.fsf@gnu.org> X-Gnu-PR-Message: they-closed 10909 X-Gnu-PR-Package: emacs Reply-To: 10909@debbugs.gnu.org Date: Sat, 22 Sep 2012 15:28:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1348327682-25531-1" This is a multi-part message in MIME format... ------------=_1348327682-25531-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #10909: 24.0.94; doc of `define-minor-mode' which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 10909@debbugs.gnu.org. --=20 10909: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D10909 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1348327682-25531-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 10909-done) by debbugs.gnu.org; 22 Sep 2012 15:27:49 +0000 Received: from localhost ([127.0.0.1]:49259 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFRcT-0006dP-FF for submit@debbugs.gnu.org; Sat, 22 Sep 2012 11:27:49 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:53346) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFRcR-0006dJ-Rl for 10909-done@debbugs.gnu.org; Sat, 22 Sep 2012 11:27:48 -0400 Received: by pbbjt11 with SMTP id jt11so7394169pbb.3 for <10909-done@debbugs.gnu.org>; Sat, 22 Sep 2012 08:26:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=StDlGnEXKCo0v+k1Hxv4hKin6PDWFrF2S4Oe/qrjJXY=; b=PYvp++FAvzf/BmOxVYp6qau2QXiaPuxHwdHqMPD3V6Um7vxtWhrvNwLq/tAXzXHQga 9YesQk68hn1YKQyMFTK5YWJcwcQggDyav14fhj+zHdV03S5EBrg0PJ+Wku9tofJ2HPiA e1u4+I9RD1BcEuzZJlonrAGJgh8i6dvWxoGWkhx9vv9XfjnME+Be+53hayjl6g3Rc64D 0fugbFoFdYCUOTmwQOH97XzUX0/RIQ/7Cyw6bpQAvoNVL6y6c7t12rBhwZkV7sL0ZT2C cfONfYOM6Lh5WuC+j9gteCLaHpwOU1AgiGzRxF3O7yFRKEFjpkuNKK7AmyTIsHsPt5Er GaQQ== Received: by 10.68.129.5 with SMTP id ns5mr23354058pbb.103.1348327564164; Sat, 22 Sep 2012 08:26:04 -0700 (PDT) Received: from ulysses (cm162.gamma80.maxonline.com.sg. [202.156.80.162]) by mx.google.com with ESMTPS id g1sm5834946paz.18.2012.09.22.08.26.01 (version=SSLv3 cipher=OTHER); Sat, 22 Sep 2012 08:26:03 -0700 (PDT) From: Chong Yidong To: "Drew Adams" Subject: Re: bug#10909: 24.0.94; doc of `define-minor-mode' References: Date: Sat, 22 Sep 2012 23:25:59 +0800 In-Reply-To: (Drew Adams's message of "Tue, 28 Feb 2012 18:54:47 -0800") Message-ID: <87y5k2dqpk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10909-done Cc: 10909-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) "Drew Adams" writes: > The non-interactive description says only "When called from Lisp, it > enables the mode if the argument is omitted or nil, and toggles the mode > if the argument is `toggle'." > > IOW, it says nothing about what happens when an arg is passed that is > not nil or omitted or `toggle'. And I've seen at least one user try to > use `(foo-mode t)'. It turns out that that has the same effect as > `(foo-mode 1)', but nothing in the doc says that it should. Fixed in trunk. ------------=_1348327682-25531-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 29 Feb 2012 02:55:31 +0000 Received: from localhost ([127.0.0.1]:54956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S2ZhS-0007KU-T4 for submit@debbugs.gnu.org; Tue, 28 Feb 2012 21:55:31 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55005) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S2ZhH-0007K8-EF for submit@debbugs.gnu.org; Tue, 28 Feb 2012 21:55:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2Zgz-0001H6-Hm for submit@debbugs.gnu.org; Tue, 28 Feb 2012 21:55:02 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:39430) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2Zgz-0001Fu-Dq for submit@debbugs.gnu.org; Tue, 28 Feb 2012 21:55:01 -0500 Received: from eggs.gnu.org ([208.118.235.92]:59502) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2Zgx-00083G-Kl for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2012 21:55:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2Zgv-0001CY-EX for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2012 21:54:58 -0500 Received: from acsinet15.oracle.com ([141.146.126.227]:32872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2Zgv-0001BH-8O for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2012 21:54:57 -0500 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q1T2srCf005397 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 29 Feb 2012 02:54:54 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q1T2srTB006742 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 29 Feb 2012 02:54:53 GMT Received: from abhmt103.oracle.com (abhmt103.oracle.com [141.146.116.55]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q1T2srDi023648 for ; Tue, 28 Feb 2012 20:54:53 -0600 Received: from dradamslap1 (/10.159.42.251) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 28 Feb 2012 18:54:52 -0800 From: "Drew Adams" To: Subject: 24.0.94; doc of `define-minor-mode' Date: Tue, 28 Feb 2012 18:54:47 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: Acz2jX8aj4euog+7TJqxtjzjTSwxzA== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090203.4F4D937E.006C,ss=1,re=0.000,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) The doc says that the mode function that gets defined accepts an optional argument. The interactive description is OK. The non-interactive description says only "When called from Lisp, it enables the mode if the argument is omitted or nil, and toggles the mode if the argument is `toggle'." IOW, it says nothing about what happens when an arg is passed that is not nil or omitted or `toggle'. And I've seen at least one user try to use `(foo-mode t)'. It turns out that that has the same effect as `(foo-mode 1)', but nothing in the doc says that it should. The doc should, at a minimum, say what kinds of non-nil arguments it expects (e.g. integer). Personally, I think it should probably go beyond that and say also what it does with other non-nil args, but that's your call. In GNU Emacs 24.0.94.1 (i386-mingw-nt5.1.2600) of 2012-02-26 on MARVIN Windowing system distributor `Microsoft Corp.', version 5.1.2600 Configured using: `configure --with-gcc (4.6) --no-opt --enable-checking --cflags -ID:/devel/emacs/libs/libXpm-3.5.8/include -ID:/devel/emacs/libs/libXpm-3.5.8/src -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include -ID:/devel/emacs/libs/giflib-4.1.4-1/include -ID:/devel/emacs/libs/jpeg-6b-4/include -ID:/devel/emacs/libs/tiff-3.8.2-1/include -ID:/devel/emacs/libs/gnutls-3.0.9/include' ------------=_1348327682-25531-1-- From unknown Fri Jun 20 20:10:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10909: 24.0.94; doc of `define-minor-mode' Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Sep 2012 15:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10909 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 10909@debbugs.gnu.org Cc: cyd@gnu.org Received: via spool by 10909-submit@debbugs.gnu.org id=B10909.134841401631969 (code B ref 10909); Sun, 23 Sep 2012 15:27:01 +0000 Received: (at 10909) by debbugs.gnu.org; 23 Sep 2012 15:26:56 +0000 Received: from localhost ([127.0.0.1]:51387 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFo5A-0008Ja-1a for submit@debbugs.gnu.org; Sun, 23 Sep 2012 11:26:56 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:27696) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFo57-0008JQ-PT for 10909@debbugs.gnu.org; Sun, 23 Sep 2012 11:26:54 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu0/O+IB//2dsb2JhbABEsEiDSYEIghUBAQQBViMQCzQSFBgNiEAFugmNJoMeA6MzgViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="199767651" Received: from 206-248-128-127.dsl.teksavvy.com (HELO pastel.home) ([206.248.128.127]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 23 Sep 2012 11:25:04 -0400 Received: by pastel.home (Postfix, from userid 20848) id BF03E590C1; Sun, 23 Sep 2012 11:25:03 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87y5k2dqpk.fsf@gnu.org> Date: Sun, 23 Sep 2012 11:25:03 -0400 In-Reply-To: <87y5k2dqpk.fsf@gnu.org> (Chong Yidong's message of "Sat, 22 Sep 2012 23:25:59 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) >> IOW, it says nothing about what happens when an arg is passed that is >> not nil or omitted or `toggle'. And I've seen at least one user try to >> use `(foo-mode t)'. It turns out that that has the same effect as >> `(foo-mode 1)', but nothing in the doc says that it should. > Fixed in trunk. Actually, I think the right fix is to replace calls that use t with calls that use 1, rather than documenting the accidental behavior. Stefan From unknown Fri Jun 20 20:10:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10909: 24.0.94; doc of `define-minor-mode' Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Sep 2012 18:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10909 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "'Stefan Monnier'" , <10909@debbugs.gnu.org> Cc: cyd@gnu.org Received: via spool by 10909-submit@debbugs.gnu.org id=B10909.134842366113179 (code B ref 10909); Sun, 23 Sep 2012 18:08:01 +0000 Received: (at 10909) by debbugs.gnu.org; 23 Sep 2012 18:07:41 +0000 Received: from localhost ([127.0.0.1]:51487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFqai-0003QU-Vx for submit@debbugs.gnu.org; Sun, 23 Sep 2012 14:07:41 -0400 Received: from rcsinet15.oracle.com ([148.87.113.117]:18655) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFqag-0003QN-Kz for 10909@debbugs.gnu.org; Sun, 23 Sep 2012 14:07:39 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q8NI5lRa014319 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 23 Sep 2012 18:05:48 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q8NI5kCE001107 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 23 Sep 2012 18:05:47 GMT Received: from abhmt107.oracle.com (abhmt107.oracle.com [141.146.116.59]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q8NI5k8D012964; Sun, 23 Sep 2012 13:05:46 -0500 Received: from dradamslap1 (/10.159.184.34) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 23 Sep 2012 11:05:46 -0700 From: "Drew Adams" References: <87y5k2dqpk.fsf@gnu.org> Date: Sun, 23 Sep 2012 11:05:35 -0700 Message-ID: <232BEA225630459F82B1A4FE183AA54C@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Thread-Index: Ac2Zn6MrNYIm1JXnTiaKGvMQJHgKxAAEg0aw X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Score: -7.7 (-------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -7.7 (-------) > >> IOW, it says nothing about what happens when an arg is > >> passed that is not nil or omitted or `toggle'. > >> And I've seen at least one user try to use `(foo-mode t)'. > >> It turns out that that has the same effect as `(foo-mode 1)', > >> but nothing in the doc says that it should. > > > > Fixed in trunk. > > Actually, I think the right fix is to replace calls that use t with > calls that use 1, rather than documenting the accidental behavior. I don't know exactly what the fix was. (The latest build I have is GNU Emacs 24.2.50.1 (i386-mingw-nt5.1.2600) of 2012-09-17 on MARVIN.) But I think perhaps you are missing the point. The doc says nothing about ANY non-nil value other than `toggle'. It thus says NOTHING about how to turn OFF the mode using Lisp. It also does not say that 1 or 42 or t or `stefan' turns the mode on. (In particular, it does not favor 1 or 42 over t.) At the very least the doc should say that a positive arg turns it on and a non-positive value turns it off. That's the point. The doc is OK wrt interactive use, but not wrt Lisp calls. It's not about t vs 1 in any existing Lisp code. It's about saying what the possible argument values do. Presumably, most users calling `define-minor-mode' will mention in the doc of their new mode command how to call it from Lisp, since some users of their mode, especially if it is global, will prefer to turn it on in their init files. That is, presumably most users of `define-minor-mode' will NOT just document their new mode following the example given in the manual: "If enabled, foo on you!". They will hopefully document it in a way that tells users how to turn the mode on and off, both interactively and using Lisp. (That part could be, but is not, done automatically by `define-minor-mode'.) To document that behavior for their users, users of `define-minor-mode' should have access to doc for the macro that tells them how users of their new modes can turn them on and off using Lisp. It's really the least they can expect from a general utility macro.