GNU bug report logs - #15558
[gnu.org #859332] Error in elisp on line documentation

Previous Next

Package: emacs;

Reported by: Bill Freeman <ke1g.nh <at> gmail.com>

Date: Mon, 7 Oct 2013 23:33:02 UTC

Severity: minor

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Robert Musial via RT" <webmasters-comment <at> gnu.org>
Cc: 15558 <at> debbugs.gnu.org
Subject: bug#15558: [gnu.org #859332] Error in elisp on line documentation 
Date: Mon, 07 Oct 2013 19:32:27 -0400
Emacs team:

Below is another documentation improvement suggestion.

Thanks!


> [ke1g.nh <at> 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 <at> 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





This bug report was last modified 11 years and 286 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.