aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMattias EngdegÄrd2026-03-03 17:21:35 +0100
committerMattias EngdegÄrd2026-03-03 17:21:35 +0100
commit7eba545a4edffc096598c97922e80a5d33898d21 (patch)
treecd7366e4f4a9a562d042fc8e3684d1a5f400e15e /doc
parentdfa4a0e5a28b6f0081f973cfa254c2b31a66edf7 (diff)
downloademacs-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.texi14
-rw-r--r--doc/misc/cl.texi7
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
432This function returns non-@code{nil} if @var{pred} is true for at least 432This function returns non-@code{nil} if @var{pred} is true for at least
433one element in @var{list}. The returned value is the longest @var{list} 433one element in @var{list}. The returned value is the longest @var{list}
434suffix whose first element satisfies @var{pred}. 434suffix 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
446This function is an alias for @code{member-if}. It may be preferable in
447contexts which do not make use of the returned value, but only whether
448or not it was nil.
449@end defun
450
451@defun last list &optional n 445@defun last list &optional n
452This function returns the last link of @var{list}. The @code{car} of 446This function returns the last link of @var{list}. The @code{car} of
453this link is the list's last element. If @var{list} is null, 447this 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
3829The @code{cl-member-if-not} function analogously searches for elements 3830The @code{cl-member-if} and @code{cl-member-if-not} functions
3830that don't satisfy a given predicate. This is deprecated in the Common 3831analogously search for elements that satisfy a given predicate.
3831Lisp standard; prefer the core function @code{member-if} with a negated
3832predicate function.
3833 3832
3834@defun cl-tailp sublist list 3833@defun cl-tailp sublist list
3835This function returns @code{t} if @var{sublist} is a sublist of 3834This function returns @code{t} if @var{sublist} is a sublist of