1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-24 06:20:43 -08:00

Make 'copy-tree' work with records

* doc/lispref/lists.texi (Building Cons Cells and Lists): Document
new behavior of 'copy-tree'.
* doc/lispref/records.texi (Record Functions): Cross-reference to
lists.texi.
* etc/NEWS: Mention change.  (Bug#63509)
* lisp/emacs-lisp/shortdoc.el: Add 'copy-tree' example to vector
group.
* lisp/subr.el (copy-tree): Recurse into records as well as
vectors when optional second argument is non-nil. Rename second
argument from VECP to VECTOR-LIKE-P.
* test/lisp/subr-tests.el: Test new behavior.
This commit is contained in:
Joseph Turner 2023-05-14 21:02:15 -07:00 committed by Eli Zaretskii
parent 8c9377b6c4
commit 3a1285caba
6 changed files with 51 additions and 11 deletions

View file

@ -833,6 +833,8 @@ A FUNC form can have any number of `:no-eval' (or `:no-value'),
(seq-subseq
:eval (seq-subseq [1 2 3 4 5] 1 3)
:eval (seq-subseq [1 2 3 4 5] 1))
(copy-tree
:eval (copy-tree [1 2 3 4]))
"Mapping Over Vectors"
(mapcar
:eval (mapcar #'identity [1 2 3]))