diff options
| author | Mattias EngdegÄrd | 2026-03-03 17:21:35 +0100 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2026-03-03 17:21:35 +0100 |
| commit | 7eba545a4edffc096598c97922e80a5d33898d21 (patch) | |
| tree | cd7366e4f4a9a562d042fc8e3684d1a5f400e15e /doc | |
| parent | dfa4a0e5a28b6f0081f973cfa254c2b31a66edf7 (diff) | |
| download | emacs-7eba545a4edffc096598c97922e80a5d33898d21.tar.gz emacs-7eba545a4edffc096598c97922e80a5d33898d21.zip | |
Revert "Rename 'any' to 'member-if' and deprecate 'cl-member-if'"
This reverts commit 2bdf15f6d8293b21234cd236f39ce68f62e1f6c3.
There is no consensus for this change.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/lists.texi | 14 | ||||
| -rw-r--r-- | doc/misc/cl.texi | 7 |
2 files changed, 7 insertions, 14 deletions
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi index b361134be59..90d0bfc4d12 100644 --- a/doc/lispref/lists.texi +++ b/doc/lispref/lists.texi | |||
| @@ -428,26 +428,20 @@ This function returns @code{t} if @var{pred} is true for all elements in | |||
| 428 | @end example | 428 | @end example |
| 429 | @end defun | 429 | @end defun |
| 430 | 430 | ||
| 431 | @defun member-if pred list | 431 | @defun any pred list |
| 432 | This function returns non-@code{nil} if @var{pred} is true for at least | 432 | This function returns non-@code{nil} if @var{pred} is true for at least |
| 433 | one element in @var{list}. The returned value is the longest @var{list} | 433 | one element in @var{list}. The returned value is the longest @var{list} |
| 434 | suffix whose first element satisfies @var{pred}. | 434 | suffix whose first element satisfies @var{pred}. |
| 435 | 435 | ||
| 436 | @example | 436 | @example |
| 437 | @group | 437 | @group |
| 438 | (member-if #'symbolp '(1 2 3 4)) @result{} nil | 438 | (any #'symbolp '(1 2 3 4)) @result{} nil |
| 439 | (member-if #'symbolp '(1 2 a b 3 4)) @result{} (a b 3 4) | 439 | (any #'symbolp '(1 2 a b 3 4)) @result{} (a b 3 4) |
| 440 | (member-if #'symbolp '()) @result{} nil | 440 | (any #'symbolp '()) @result{} nil |
| 441 | @end group | 441 | @end group |
| 442 | @end example | 442 | @end example |
| 443 | @end defun | 443 | @end defun |
| 444 | 444 | ||
| 445 | @defun any pred list | ||
| 446 | This function is an alias for @code{member-if}. It may be preferable in | ||
| 447 | contexts which do not make use of the returned value, but only whether | ||
| 448 | or not it was nil. | ||
| 449 | @end defun | ||
| 450 | |||
| 451 | @defun last list &optional n | 445 | @defun last list &optional n |
| 452 | This function returns the last link of @var{list}. The @code{car} of | 446 | This function returns the last link of @var{list}. The @code{car} of |
| 453 | this link is the list's last element. If @var{list} is null, | 447 | this link is the list's last element. If @var{list} is null, |
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi index 86af253bdf1..bf980c0888f 100644 --- a/doc/misc/cl.texi +++ b/doc/misc/cl.texi | |||
| @@ -3825,11 +3825,10 @@ comparisons; it is equivalent to @code{(cl-member @var{item} @var{list} | |||
| 3825 | :test 'equal)}. | 3825 | :test 'equal)}. |
| 3826 | @end defun | 3826 | @end defun |
| 3827 | 3827 | ||
| 3828 | @findex cl-member-if | ||
| 3828 | @findex cl-member-if-not | 3829 | @findex cl-member-if-not |
| 3829 | The @code{cl-member-if-not} function analogously searches for elements | 3830 | The @code{cl-member-if} and @code{cl-member-if-not} functions |
| 3830 | that don't satisfy a given predicate. This is deprecated in the Common | 3831 | analogously search for elements that satisfy a given predicate. |
| 3831 | Lisp standard; prefer the core function @code{member-if} with a negated | ||
| 3832 | predicate function. | ||
| 3833 | 3832 | ||
| 3834 | @defun cl-tailp sublist list | 3833 | @defun cl-tailp sublist list |
| 3835 | This function returns @code{t} if @var{sublist} is a sublist of | 3834 | This function returns @code{t} if @var{sublist} is a sublist of |