From unknown Mon Aug 18 06:57:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15558: [gnu.org #859332] Error in elisp on line documentation Resent-From: "Robert Musial via RT" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Oct 2013 23:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 15558 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Cc: 15558@debbugs.gnu.org X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org Reply-To: webmasters-comment@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.138118876424671 (code B ref -1); Mon, 07 Oct 2013 23:33:02 +0000 Received: (at submit) by debbugs.gnu.org; 7 Oct 2013 23:32:44 +0000 Received: from localhost ([127.0.0.1]:33149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTKI7-0006Pr-Ik for submit@debbugs.gnu.org; Mon, 07 Oct 2013 19:32:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38451) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTKI6-0006Pk-0V for submit@debbugs.gnu.org; Mon, 07 Oct 2013 19:32:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTKI0-0002XD-PB for submit@debbugs.gnu.org; Mon, 07 Oct 2013 19:32:41 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.6 required=5.0 tests=BAYES_50,MISSING_HEADERS, RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36948) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTKI0-0002X4-MH for submit@debbugs.gnu.org; Mon, 07 Oct 2013 19:32:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTKHw-00049b-1g for bug-gnu-emacs@gnu.org; Mon, 07 Oct 2013 19:32:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTKHr-0002VY-GX for bug-gnu-emacs@gnu.org; Mon, 07 Oct 2013 19:32:31 -0400 Received: from rt.gnu.org ([74.94.156.213]:36736) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTKHr-0002VS-Dn for bug-gnu-emacs@gnu.org; Mon, 07 Oct 2013 19:32:27 -0400 Received: from www-data by rt.gnu.org with local (Exim 4.69) (envelope-from ) id 1VTKHr-0005nN-2S for bug-gnu-emacs@gnu.org; Mon, 07 Oct 2013 19:32:27 -0400 From: "Robert Musial via RT" In-Reply-To: References: Message-ID: Precedence: bulk X-RT-Loop-Prevention: gnu.org RT-Ticket: gnu.org #859332 Managed-by: RT 3.4.5 (http://www.bestpractical.com/rt/) RT-Originator: musial@gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-RT-Original-Encoding: utf-8 Date: Mon, 07 Oct 2013 19:32:27 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Emacs team: Below is another documentation improvement suggestion. Thanks! > [ke1g.nh@gmail.com - Thu Sep 26 12:06:21 2013]: > > (Please forward to the appropriate document maintainer.) > > I believe that I have found an error in the description of cond at: > > > http://www.gnu.org/software/emacs/manual/html_node/elisp/Conditionals.html > > The description implies that the "condition" element of a clause is not > included in "body-forms". This is a reasonable separation, since (if the > clause is reached) the condition is evaluated while the body-forms may or > may not be (depending upon the condition's value). > > But it goes on to say that the value (of the cond) is that of the last of > the body-forms to be evaluated. Yet it is perfectly legal for a clause to > have no body-forms, only a condition. In this case, if the condition is > non-nil, that is, if the clause succeeds, the value of the cond will be the > value of the condition. This is the last form evaluated, not the last of > the body-forms evaluated (since none of the body-forms were evaluated). > > You can confirm this behavior by evaluating the following (the result will > be 3): > > > (cond (3)(1 4)) > > The current text actually leaves the value undefined for this case. It is > a useful case, and should be correctly documented. > > Perhaps something like: > > > ...and the value of the last of body-forms, or, if there are no > body-forms in the clause, the value of the condition, becomes the value of > the cond. > > Bill (formerly f@ai. "Hi" to RMS if he's about) > > -- Robert Musial - musial at gnu dot org - GPG key 533A1341 Join the FSF! http://www.fsf.org/register_form?referrer=9143 From unknown Mon Aug 18 06:57:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15558: [gnu.org #859332] Error in elisp on line documentation In-Reply-To: Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Oct 2013 16:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15558 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 15558@debbugs.gnu.org Cc: ke1g.nh@gmail.com, webmasters-comment@gnu.org Received: via spool by 15558-submit@debbugs.gnu.org id=B15558.13812490813514 (code B ref 15558); Tue, 08 Oct 2013 16:18:02 +0000 Received: (at 15558) by debbugs.gnu.org; 8 Oct 2013 16:18:01 +0000 Received: from localhost ([127.0.0.1]:35188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTZyy-0000uc-NE for submit@debbugs.gnu.org; Tue, 08 Oct 2013 12:18:01 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:32877) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTZyw-0000uU-QM for 15558@debbugs.gnu.org; Tue, 08 Oct 2013 12:17:59 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1VTZyv-0000NS-2j; Tue, 08 Oct 2013 12:17:57 -0400 From: Glenn Morris References: X-Spook: AVIP AGT. AMME satellite imagery Albright cracking Israel X-Ran: B_Kby0{rC?URO@DBnG`RW,T'9mVg8b$D(-tCB~MnLU})Esp<#_)DRAIfmwY%mH1V-,9_rk X-Hue: blue X-Attribution: GM Date: Tue, 08 Oct 2013 12:17:56 -0400 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.3 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) "Robert Musial via RT" wrote: >> Yet it is perfectly legal for a clause to have no body-forms, only a >> condition. [...] >> The current text actually leaves the value undefined for this case. It is >> a useful case, and should be correctly documented. It is documented (if a little clunkily): A clause may also look like this: (condition) Then, if condition is non-nil when tested, the value of condition becomes the value of the cond form. PS: Please report Emacs documentation issues via M-x report-emacs-bug (or mail to bug-gnu-emacs@gnu.org) rather than emailing GNU webmasters. From unknown Mon Aug 18 06:57:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15558: [gnu.org #859332] Error in elisp on line documentation Resent-From: Bill Freeman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Oct 2013 17:41:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15558 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris Received: via spool by 15558-submit@debbugs.gnu.org id=B15558.138125405011493 (code B ref 15558); Tue, 08 Oct 2013 17:41:03 +0000 Received: (at 15558) by debbugs.gnu.org; 8 Oct 2013 17:40:50 +0000 Received: from localhost ([127.0.0.1]:35422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTbH7-0002zI-Ol for submit@debbugs.gnu.org; Tue, 08 Oct 2013 13:40:50 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:34185) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTbCI-0002r4-CJ for 15558@debbugs.gnu.org; Tue, 08 Oct 2013 13:35:50 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1VTbCH-0008Ik-RE for 15558@debbugs.gnu.org; Tue, 08 Oct 2013 13:35:50 -0400 Resent-Message-ID: <21076.17013.772862.377459@gnu.org> Resent-Date: Tue, 8 Oct 2013 13:35:49 -0400 Resent-From: Glenn Morris Resent-To: 15558@debbugs.gnu.org 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,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=+/p+3Nlt+h7lUcjN+JOlheFhNZSrlYd5N8HLUAlaI+c=; b=LnnZ4qT/1R8APqDB3zHLw+HH/rbEVy/AeuVUiTY7Ys3KZ75oKNwCoktc617HtYRjMg bfDzIyVOoYEETdn3WEK08t7Hi5LtyKAUC4SyOALrlHMF1qNkt73uvh/UPXEIJNT3L7Z7 kxwq/uo4uEvBIEC5gtBxsWv71WSF7zyc/8OIugO3/6Ru4PoQxf7oSlvedFiEOsjem023 cyunwr93Whhq1UreC55PM2iVgsBjkrVWhCfN2F2GNs3oBMliS9qujLYLXwbNezj+2/Iu BkpD16/f8xSP8TIxTSxT9eGOsW3/NRluMvv66TCgVBCzMSYlSEBvJszBZVJlemrRLVbH 1qaA== MIME-Version: 1.0 X-Received: by 10.224.111.195 with SMTP id t3mr4914503qap.49.1381253567216; Tue, 08 Oct 2013 10:32:47 -0700 (PDT) In-Reply-To: References: Message-ID: Content-Type: multipart/alternative; boundary=047d7b60457e3801e704e83e2841 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c01::234 Date: Tue, 8 Oct 2013 13:32:47 -0400 From: Bill Freeman X-Bogosity: no, spamicity=0.047834, v1.2.1 X-Spam-Score: -5.3 (-----) X-Mailman-Approved-At: Tue, 08 Oct 2013 13:40:45 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) --047d7b60457e3801e704e83e2841 Content-Type: text/plain; charset=ISO-8859-1 Yes, thanks, I see that now. (And I thought I was reading carefully.) But might I suggest that the line: If every condition evaluates to nil, so that every clause fails, condreturns nil. be placed after the line: Then, if condition is non-nil when tested, the value of conditionbecomes the value of the cond form. Bill On Tue, Oct 8, 2013 at 12:17 PM, Glenn Morris wrote: > > "Robert Musial via RT" wrote: > > >> Yet it is perfectly legal for a clause to have no body-forms, only a > >> condition. > [...] > >> The current text actually leaves the value undefined for this case. It > is > >> a useful case, and should be correctly documented. > > It is documented (if a little clunkily): > > A clause may also look like this: > > (condition) > > Then, if condition is non-nil when tested, the value of condition > becomes the value of the cond form. > > > PS: Please report Emacs documentation issues via M-x report-emacs-bug > (or mail to bug-gnu-emacs@gnu.org) rather than emailing GNU webmasters. > --047d7b60457e3801e704e83e2841 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Yes, thanks, I see that now.=A0 (And I thou= ght I was reading carefully.)

But might I suggest that the lin= e:

=A0=A0=A0 If every condition evaluates to nil, so that every clause fails, cond returns nil.
be placed after the line:

=A0=A0=A0 <= /code>Then, if condition is non-nil when tested, th= e value of condition becomes the value of the cond form.
Bill


On Tue, Oct 8, 2013 at 12:17 PM, Glenn Morris &l= t;rgm@gnu.org> wrote:

"Robert Musial via RT" wrote:

>> Yet it is perfectly legal for a clause to have no body-forms, only= a
>> condition.
[...]
>> The current text actually leaves the value undefined for this case= . =A0It is
>> a useful case, and should be correctly documented.

It is documented (if a little clunkily):

=A0 =A0 A clause may also look like this:

=A0 =A0 (condition)

=A0 =A0 Then, if condition is non-nil when tested, the value of condition =A0 =A0 becomes the value of the cond form.


PS: Please report Emacs documentation issues via M-x report-emacs-bug
(or mail to bug-gnu-emacs@gnu.org<= /a>) rather than emailing GNU webmasters.

--047d7b60457e3801e704e83e2841-- From unknown Mon Aug 18 06:57:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15558: [gnu.org #859332] Error in elisp on line documentation Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Oct 2013 17:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15558 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Bill Freeman Cc: 15558@debbugs.gnu.org Received: via spool by 15558-submit@debbugs.gnu.org id=B15558.13813391614464 (code B ref 15558); Wed, 09 Oct 2013 17:20:02 +0000 Received: (at 15558) by debbugs.gnu.org; 9 Oct 2013 17:19:21 +0000 Received: from localhost ([127.0.0.1]:38173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTxPo-00019p-Uk for submit@debbugs.gnu.org; Wed, 09 Oct 2013 13:19:20 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:55935) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTxPj-00019c-EB for 15558@debbugs.gnu.org; Wed, 09 Oct 2013 13:19:15 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1VTxPh-0006an-QK; Wed, 09 Oct 2013 13:19:09 -0400 From: Glenn Morris References: X-Spook: Yukon JFK virus Ermes kilderkin Leitrim top secret X-Ran: /skns[JA!ITNaGA<%x,se72U`ce6gwVXDL:Po1?6d5-r'|}9(q'B*x9H*H(+'l\Hj'\hy/ X-Hue: blue X-Attribution: GM Date: Wed, 09 Oct 2013 13:19:09 -0400 In-Reply-To: (Bill Freeman's message of "Tue, 8 Oct 2013 13:32:47 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.2 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.2 (-----) (Please keep the debbugs address included in any replies.) Bill Freeman wrote: > But might I suggest that the line: > > If every condition evaluates to nil, so that every clause fails, > condreturns > nil. > be placed after the line: > > Then, if condition is non-nil when tested, the value of > conditionbecomes the value of the > cond form. OK, done in the Emacs sources. The online version will be regenerated at time of next Emacs release. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 09 13:20:18 2013 Received: (at control) by debbugs.gnu.org; 9 Oct 2013 17:20:19 +0000 Received: from localhost ([127.0.0.1]:38178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTxQo-0001Br-3K for submit@debbugs.gnu.org; Wed, 09 Oct 2013 13:20:18 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:55973) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTxQl-0001Be-Fa for control@debbugs.gnu.org; Wed, 09 Oct 2013 13:20:15 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1VTxQl-0006sX-8L for control@debbugs.gnu.org; Wed, 09 Oct 2013 13:20:15 -0400 Date: Wed, 09 Oct 2013 13:20:15 -0400 Message-Id: Subject: control message for bug 15558 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.2 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.2 (-----) submitter 15558 Bill Freeman close 15558 24.4