diff options
| author | Eli Zaretskii | 2025-12-06 12:57:32 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2025-12-06 12:57:32 +0200 |
| commit | 368c86bab4bc208c7ec33df253b850dcc91e4ea1 (patch) | |
| tree | 44078a5f77d5eab9644a20986f0203f90cfbd961 | |
| parent | 51c519ea2da70c7e899bda9c2a662c0ba8b7dce3 (diff) | |
| download | emacs-368c86bab4bc208c7ec33df253b850dcc91e4ea1.tar.gz emacs-368c86bab4bc208c7ec33df253b850dcc91e4ea1.zip | |
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)
| -rw-r--r-- | doc/lispref/sequences.texi | 9 | ||||
| -rw-r--r-- | lisp/emacs-lisp/seq.el | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi index 2f7c6876a8f..2b1db79e07b 100644 --- a/doc/lispref/sequences.texi +++ b/doc/lispref/sequences.texi | |||
| @@ -1109,10 +1109,11 @@ instead of the default @code{equal}. | |||
| 1109 | @defun seq-intersection sequence1 sequence2 &optional function | 1109 | @defun seq-intersection sequence1 sequence2 &optional function |
| 1110 | @cindex sequences, intersection of | 1110 | @cindex sequences, intersection of |
| 1111 | @cindex intersection of sequences | 1111 | @cindex intersection of sequences |
| 1112 | This function returns a list of the elements that appear both in | 1112 | This function returns a copy of @var{sequence1} from which the |
| 1113 | @var{sequence1} and @var{sequence2}. If the optional argument | 1113 | elements that appear in @var{sequence2} where removed. If the optional |
| 1114 | @var{function} is non-@code{nil}, it is a function of two arguments to | 1114 | argument @var{function} is non-@code{nil}, it is a function of two |
| 1115 | use to compare elements instead of the default @code{equal}. | 1115 | arguments to use to compare elements instead of the default |
| 1116 | @code{equal}. | ||
| 1116 | 1117 | ||
| 1117 | @example | 1118 | @example |
| 1118 | @group | 1119 | @group |
diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el index 4713deea750..38aaeba7c9b 100644 --- a/lisp/emacs-lisp/seq.el +++ b/lisp/emacs-lisp/seq.el | |||
| @@ -567,7 +567,7 @@ This does not modify SEQUENCE1 or SEQUENCE2." | |||
| 567 | 567 | ||
| 568 | ;;;###autoload | 568 | ;;;###autoload |
| 569 | (cl-defgeneric seq-intersection (sequence1 sequence2 &optional testfn) | 569 | (cl-defgeneric seq-intersection (sequence1 sequence2 &optional testfn) |
| 570 | "Return a list of all the elements that appear in both SEQUENCE1 and SEQUENCE2. | 570 | "Return copy of SEQUENCE1 with elements that appear in SEQUENCE2 removed. |
| 571 | \"Equality\" of elements is defined by the function TESTFN, which | 571 | \"Equality\" of elements is defined by the function TESTFN, which |
| 572 | defaults to `equal'. | 572 | defaults to `equal'. |
| 573 | This does not modify SEQUENCE1 or SEQUENCE2." | 573 | This does not modify SEQUENCE1 or SEQUENCE2." |