]> git.eshelyaron.com Git - emacs.git/commitdiff
Doc tweaks for cond
authorGlenn Morris <rgm@gnu.org>
Wed, 9 Oct 2013 17:17:20 +0000 (13:17 -0400)
committerGlenn Morris <rgm@gnu.org>
Wed, 9 Oct 2013 17:17:20 +0000 (13:17 -0400)
* doc/lispref/control.texi (Conditionals): Copyedits.

* src/eval.c (Fcond): Doc tweak.

doc/lispref/ChangeLog
doc/lispref/control.texi
src/ChangeLog
src/eval.c

index 4f6a92ef5f320d8793d39fd6dc39088b742b3cc2..8b55cfddec2c77e6e7c20401cf8eb1650f436aca 100644 (file)
@@ -1,3 +1,7 @@
+2013-10-09  Glenn Morris  <rgm@gnu.org>
+
+       * control.texi (Conditionals): Copyedits.  (Bug#15558)
+
 2013-10-08  Eli Zaretskii  <eliz@gnu.org>
 
        Support menus on text-mode terminals.
index 70eabcd84a4b07e0f20616121cec4c14d031dbe1..34a02aab69dd756b3be21f04588bfcfbbb7b2f91 100644 (file)
@@ -218,15 +218,11 @@ list is the @var{condition}; the remaining elements, if any, the
 @code{cond} tries the clauses in textual order, by evaluating the
 @var{condition} of each clause.  If the value of @var{condition} is
 non-@code{nil}, the clause ``succeeds''; then @code{cond} evaluates its
-@var{body-forms}, and the value of the last of @var{body-forms} becomes
-the value of the @code{cond}.  The remaining clauses are ignored.
+@var{body-forms}, and returns the value of the last of @var{body-forms}.
+Any remaining clauses are ignored.
 
 If the value of @var{condition} is @code{nil}, the clause ``fails'', so
-the @code{cond} moves on to the following clause, trying its
-@var{condition}.
-
-If every @var{condition} evaluates to @code{nil}, so that every clause
-fails, @code{cond} returns @code{nil}.
+the @code{cond} moves on to the following clause, trying its @var{condition}.
 
 A clause may also look like this:
 
@@ -235,8 +231,11 @@ A clause may also look like this:
 @end example
 
 @noindent
-Then, if @var{condition} is non-@code{nil} when tested, the value of
-@var{condition} becomes the value of the @code{cond} form.
+Then, if @var{condition} is non-@code{nil} when tested, the @code{cond}
+form returns the value of @var{condition}.
+
+If every @var{condition} evaluates to @code{nil}, so that every clause
+fails, @code{cond} returns @code{nil}.
 
 The following example has four clauses, which test for the cases where
 the value of @code{x} is a number, string, buffer and symbol,
index eee3ee8237e0299bd2b995943dbea9ba511f0631..3ae42ea87c899a8673491e32b9e3a39f74a58f8b 100644 (file)
@@ -1,3 +1,7 @@
+2013-10-09  Glenn Morris  <rgm@gnu.org>
+
+       * eval.c (Fcond): Doc tweak.
+
 2013-10-09  Eli Zaretskii  <eliz@gnu.org>
 
        * xfaces.c (x_free_gc) [HAVE_X_WINDOWS, HAVE_NTGUI]: Don't pass
index 3b4dc9a88d1e6bc67e5f479fb7e86c324abe8ffd..1e0a63a0eceb54e5e04522ee8eae180bd1249132 100644 (file)
@@ -1,6 +1,6 @@
 /* Evaluator for GNU Emacs Lisp interpreter.
-   Copyright (C) 1985-1987, 1993-1995, 1999-2013 Free Software
-   Foundation, Inc.
+
+Copyright (C) 1985-1987, 1993-1995, 1999-2013 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -405,9 +405,9 @@ Each clause looks like (CONDITION BODY...).  CONDITION is evaluated
 and, if the value is non-nil, this clause succeeds:
 then the expressions in BODY are evaluated and the last one's
 value is the value of the cond-form.
+If a clause has one element, as in (CONDITION), then the cond-form
+returns CONDITION's value, if that is non-nil.
 If no clause succeeds, cond returns nil.
-If a clause has one element, as in (CONDITION),
-CONDITION's value if non-nil is returned from the cond-form.
 usage: (cond CLAUSES...)  */)
   (Lisp_Object args)
 {