1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 04:10:54 -08:00

Improve documentation of 'seq-intersection'

* doc/lispref/sequences.texi (Sequence Functions):
* lisp/emacs-lisp/seq.el (seq-intersection): Clarify the
documentation of 'seq-intersection'.  (Bug#79844)
This commit is contained in:
Eli Zaretskii 2025-12-06 12:57:32 +02:00
parent 51c519ea2d
commit 368c86bab4
2 changed files with 6 additions and 5 deletions

View file

@ -1109,10 +1109,11 @@ instead of the default @code{equal}.
@defun seq-intersection sequence1 sequence2 &optional function
@cindex sequences, intersection of
@cindex intersection of sequences
This function returns a list of the elements that appear both in
@var{sequence1} and @var{sequence2}. If the optional argument
@var{function} is non-@code{nil}, it is a function of two arguments to
use to compare elements instead of the default @code{equal}.
This function returns a copy of @var{sequence1} from which the
elements that appear in @var{sequence2} where removed. If the optional
argument @var{function} is non-@code{nil}, it is a function of two
arguments to use to compare elements instead of the default
@code{equal}.
@example
@group

View file

@ -567,7 +567,7 @@ This does not modify SEQUENCE1 or SEQUENCE2."
;;;###autoload
(cl-defgeneric seq-intersection (sequence1 sequence2 &optional testfn)
"Return a list of all the elements that appear in both SEQUENCE1 and SEQUENCE2.
"Return copy of SEQUENCE1 with elements that appear in SEQUENCE2 removed.
\"Equality\" of elements is defined by the function TESTFN, which
defaults to `equal'.
This does not modify SEQUENCE1 or SEQUENCE2."