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 /doc/lispref/control.texi | |
| 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.
Diffstat (limited to 'doc/lispref/control.texi')
| -rw-r--r-- | doc/lispref/control.texi | 17 |
1 files changed, 8 insertions, 9 deletions
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, |