diff options
| author | Glenn Morris | 2013-10-09 13:17:20 -0400 |
|---|---|---|
| committer | Glenn Morris | 2013-10-09 13:17:20 -0400 |
| commit | fa02290953acd2d0cda982d98ffd32e9f6873d28 (patch) | |
| tree | 2a141d56f3222dceb56771b7cb5d606f9809362c | |
| parent | 574411d08a399826fb02d7c2d71280d567e5d181 (diff) | |
| download | emacs-fa02290953acd2d0cda982d98ffd32e9f6873d28.tar.gz emacs-fa02290953acd2d0cda982d98ffd32e9f6873d28.zip | |
Doc tweaks for cond
* doc/lispref/control.texi (Conditionals): Copyedits.
* src/eval.c (Fcond): Doc tweak.
| -rw-r--r-- | doc/lispref/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/lispref/control.texi | 17 | ||||
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/eval.c | 8 |
4 files changed, 20 insertions, 13 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 4f6a92ef5f3..8b55cfddec2 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2013-10-09 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * control.texi (Conditionals): Copyedits. (Bug#15558) | ||
| 4 | |||
| 1 | 2013-10-08 Eli Zaretskii <eliz@gnu.org> | 5 | 2013-10-08 Eli Zaretskii <eliz@gnu.org> |
| 2 | 6 | ||
| 3 | Support menus on text-mode terminals. | 7 | Support menus on text-mode terminals. |
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi index 70eabcd84a4..34a02aab69d 100644 --- a/doc/lispref/control.texi +++ b/doc/lispref/control.texi | |||
| @@ -218,15 +218,11 @@ list is the @var{condition}; the remaining elements, if any, the | |||
| 218 | @code{cond} tries the clauses in textual order, by evaluating the | 218 | @code{cond} tries the clauses in textual order, by evaluating the |
| 219 | @var{condition} of each clause. If the value of @var{condition} is | 219 | @var{condition} of each clause. If the value of @var{condition} is |
| 220 | non-@code{nil}, the clause ``succeeds''; then @code{cond} evaluates its | 220 | non-@code{nil}, the clause ``succeeds''; then @code{cond} evaluates its |
| 221 | @var{body-forms}, and the value of the last of @var{body-forms} becomes | 221 | @var{body-forms}, and returns the value of the last of @var{body-forms}. |
| 222 | the value of the @code{cond}. The remaining clauses are ignored. | 222 | Any remaining clauses are ignored. |
| 223 | 223 | ||
| 224 | If the value of @var{condition} is @code{nil}, the clause ``fails'', so | 224 | If the value of @var{condition} is @code{nil}, the clause ``fails'', so |
| 225 | the @code{cond} moves on to the following clause, trying its | 225 | the @code{cond} moves on to the following clause, trying its @var{condition}. |
| 226 | @var{condition}. | ||
| 227 | |||
| 228 | If every @var{condition} evaluates to @code{nil}, so that every clause | ||
| 229 | fails, @code{cond} returns @code{nil}. | ||
| 230 | 226 | ||
| 231 | A clause may also look like this: | 227 | A clause may also look like this: |
| 232 | 228 | ||
| @@ -235,8 +231,11 @@ A clause may also look like this: | |||
| 235 | @end example | 231 | @end example |
| 236 | 232 | ||
| 237 | @noindent | 233 | @noindent |
| 238 | Then, if @var{condition} is non-@code{nil} when tested, the value of | 234 | Then, if @var{condition} is non-@code{nil} when tested, the @code{cond} |
| 239 | @var{condition} becomes the value of the @code{cond} form. | 235 | form returns the value of @var{condition}. |
| 236 | |||
| 237 | If every @var{condition} evaluates to @code{nil}, so that every clause | ||
| 238 | fails, @code{cond} returns @code{nil}. | ||
| 240 | 239 | ||
| 241 | The following example has four clauses, which test for the cases where | 240 | The following example has four clauses, which test for the cases where |
| 242 | the value of @code{x} is a number, string, buffer and symbol, | 241 | the value of @code{x} is a number, string, buffer and symbol, |
diff --git a/src/ChangeLog b/src/ChangeLog index eee3ee8237e..3ae42ea87c8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2013-10-09 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * eval.c (Fcond): Doc tweak. | ||
| 4 | |||
| 1 | 2013-10-09 Eli Zaretskii <eliz@gnu.org> | 5 | 2013-10-09 Eli Zaretskii <eliz@gnu.org> |
| 2 | 6 | ||
| 3 | * xfaces.c (x_free_gc) [HAVE_X_WINDOWS, HAVE_NTGUI]: Don't pass | 7 | * xfaces.c (x_free_gc) [HAVE_X_WINDOWS, HAVE_NTGUI]: Don't pass |
diff --git a/src/eval.c b/src/eval.c index 3b4dc9a88d1..1e0a63a0ece 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Evaluator for GNU Emacs Lisp interpreter. | 1 | /* Evaluator for GNU Emacs Lisp interpreter. |
| 2 | Copyright (C) 1985-1987, 1993-1995, 1999-2013 Free Software | 2 | |
| 3 | Foundation, Inc. | 3 | Copyright (C) 1985-1987, 1993-1995, 1999-2013 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -405,9 +405,9 @@ Each clause looks like (CONDITION BODY...). CONDITION is evaluated | |||
| 405 | and, if the value is non-nil, this clause succeeds: | 405 | and, if the value is non-nil, this clause succeeds: |
| 406 | then the expressions in BODY are evaluated and the last one's | 406 | then the expressions in BODY are evaluated and the last one's |
| 407 | value is the value of the cond-form. | 407 | value is the value of the cond-form. |
| 408 | If a clause has one element, as in (CONDITION), then the cond-form | ||
| 409 | returns CONDITION's value, if that is non-nil. | ||
| 408 | If no clause succeeds, cond returns nil. | 410 | If no clause succeeds, cond returns nil. |
| 409 | If a clause has one element, as in (CONDITION), | ||
| 410 | CONDITION's value if non-nil is returned from the cond-form. | ||
| 411 | usage: (cond CLAUSES...) */) | 411 | usage: (cond CLAUSES...) */) |
| 412 | (Lisp_Object args) | 412 | (Lisp_Object args) |
| 413 | { | 413 | { |