diff options
| author | Nicolas Petton | 2015-09-13 16:18:24 +0200 |
|---|---|---|
| committer | Nicolas Petton | 2015-09-21 11:48:55 +0200 |
| commit | 0a893f0cfa166d7f17d982c3f0503dff2be25f62 (patch) | |
| tree | cdb172d4889e26e5502fee4dbbe5f3af1d5ebc57 /doc/lispref | |
| parent | e2f0dd2f49d8638d20615bfa38e95a71202dd543 (diff) | |
| download | emacs-0a893f0cfa166d7f17d982c3f0503dff2be25f62.tar.gz emacs-0a893f0cfa166d7f17d982c3f0503dff2be25f62.zip | |
Better docstring and parameter name for seq-find
* lisp/emacs-lisp/seq.el (seq-find): Improve the docstring and rename
the parameter `sentinel' to `default'.
* doc/lispref/sequences.texi (Sequence Functions): Update the
documentation for `seq-find' accordingly.
Diffstat (limited to 'doc/lispref')
| -rw-r--r-- | doc/lispref/sequences.texi | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi index 6292c02a21d..b85d5d4c1b1 100644 --- a/doc/lispref/sequences.texi +++ b/doc/lispref/sequences.texi | |||
| @@ -578,15 +578,14 @@ value is the value returned by @var{predicate}. | |||
| 578 | @end example | 578 | @end example |
| 579 | @end defun | 579 | @end defun |
| 580 | 580 | ||
| 581 | @defun seq-find predicate sequence &optional sentinel | 581 | @defun seq-find predicate sequence &optional default |
| 582 | This function returns the first element for which @var{predicate} | 582 | This function returns the first element for which @var{predicate} |
| 583 | returns non-@code{nil} in @var{sequence}. If no element matches | 583 | returns non-@code{nil} in @var{sequence}. If no element matches |
| 584 | @var{predicate}, @var{sentinel} is returned if non-@code{nil}, | 584 | @var{predicate}, @var{default} is returned. |
| 585 | @code{nil} otherwise. | ||
| 586 | 585 | ||
| 587 | Note that this function has an ambiguity if the found element is | 586 | Note that this function has an ambiguity if the found element is |
| 588 | @code{nil}, and if no @var{sentinel} is specified, as it cannot be | 587 | identical to @var{default}, as it cannot be known if an element was |
| 589 | known if an element was found or not. | 588 | found or not. |
| 590 | 589 | ||
| 591 | @example | 590 | @example |
| 592 | @group | 591 | @group |