aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Schmidt2026-01-25 13:57:21 +0100
committerEli Zaretskii2026-01-31 16:08:52 +0200
commite08efecd96bbe1fa15fc0d94f631acadef6566de (patch)
treed45033443b4a0e90bc9a37a5c9805c6efea95620
parent346f1bda6bf07776587bacb19f19d82ee026220c (diff)
downloademacs-e08efecd96bbe1fa15fc0d94f631acadef6566de.tar.gz
emacs-e08efecd96bbe1fa15fc0d94f631acadef6566de.zip
Improve documentation of 'seq-difference'
* doc/lispref/sequences.texi (Sequence Functions): * lisp/emacs-lisp/seq.el (seq-difference): Clarify the documentation of 'seq-difference'. (Bug#80257)
-rw-r--r--doc/lispref/sequences.texi9
-rw-r--r--lisp/emacs-lisp/seq.el2
2 files changed, 6 insertions, 5 deletions
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi
index 853b577c910..afee255346c 100644
--- a/doc/lispref/sequences.texi
+++ b/doc/lispref/sequences.texi
@@ -1125,10 +1125,11 @@ two arguments to use to compare elements instead of the default
1125 1125
1126 1126
1127@defun seq-difference sequence1 sequence2 &optional function 1127@defun seq-difference sequence1 sequence2 &optional function
1128 This function returns a list of the elements that appear in 1128 This function returns a copy of @var{sequence1} from which the
1129@var{sequence1} but not in @var{sequence2}. If the optional argument 1129elements that appear in @var{sequence2} were removed. If the optional
1130@var{function} is non-@code{nil}, it is a function of two arguments to 1130argument @var{function} is non-@code{nil}, it is a function of two
1131use to compare elements instead of the default @code{equal}. 1131arguments to use to compare elements instead of the default
1132@code{equal}.
1132 1133
1133@example 1134@example
1134@group 1135@group
diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el
index 881fae951b6..e0a41b380b5 100644
--- a/lisp/emacs-lisp/seq.el
+++ b/lisp/emacs-lisp/seq.el
@@ -579,7 +579,7 @@ This does not modify SEQUENCE1 or SEQUENCE2."
579 '())) 579 '()))
580 580
581(cl-defgeneric seq-difference (sequence1 sequence2 &optional testfn) 581(cl-defgeneric seq-difference (sequence1 sequence2 &optional testfn)
582 "Return list of all the elements that appear in SEQUENCE1 but not in SEQUENCE2. 582 "Return copy of SEQUENCE1 with elements that appear in SEQUENCE2 removed.
583\"Equality\" of elements is defined by the function TESTFN, which 583\"Equality\" of elements is defined by the function TESTFN, which
584defaults to `equal'. 584defaults to `equal'.
585This does not modify SEQUENCE1 or SEQUENCE2." 585This does not modify SEQUENCE1 or SEQUENCE2."