[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master b90c658: Update docstrings of 'delete'/'remove' to interlink each
From: |
Juri Linkov |
Subject: |
master b90c658: Update docstrings of 'delete'/'remove' to interlink each other (bug#47054) |
Date: |
Thu, 11 Mar 2021 14:08:38 -0500 (EST) |
branch: master
commit b90c658492a2548f183bf072be50f4a57a2b5f0b
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>
Update docstrings of 'delete'/'remove' to interlink each other (bug#47054)
* lisp/subr.el (remove): Add xref to 'delete'.
* src/fns.c (Fdelete): Add xref to 'remove'.
---
lisp/subr.el | 4 +++-
src/fns.c | 3 ++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/lisp/subr.el b/lisp/subr.el
index 77bc7a3..ef0e5e6 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -887,7 +887,9 @@ Example:
(defun remove (elt seq)
"Return a copy of SEQ with all occurrences of ELT removed.
-SEQ must be a list, vector, or string. The comparison is done with `equal'."
+SEQ must be a list, vector, or string. The comparison is done with `equal'.
+Contrary to `delete', this does not use side-effects, and the argument
+SEQ is not modified."
(declare (side-effect-free t))
(if (nlistp seq)
;; If SEQ isn't a list, there's no need to copy SEQ because
diff --git a/src/fns.c b/src/fns.c
index b193ad6..766e767 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -1867,7 +1867,8 @@ If SEQ is not a list, deletion is never performed
destructively;
instead this function creates and returns a new vector or string.
Write `(setq foo (delete element foo))' to be sure of correctly
-changing the value of a sequence `foo'. */)
+changing the value of a sequence `foo'. See also `remove', which
+does not modify the argument. */)
(Lisp_Object elt, Lisp_Object seq)
{
if (VECTORP (seq))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master b90c658: Update docstrings of 'delete'/'remove' to interlink each other (bug#47054),
Juri Linkov <=