Improved copy-tree documentation and test (bug#63509)
* etc/NEWS: Move entry since it's an incompatible change. * lisp/emacs-lisp/shortdoc.el (vector): Make the example relevant. * lisp/subr.el (copy-tree): Rename second argument, since 'vector-like' is a term with a specific meaning in Emacs but not the one intended here. * doc/lispref/lists.texi (Building Lists): Rename second argument, and make it clear that the input must be acyclic. * doc/lispref/records.texi (Record Functions): Be more precise: `copy-sequence` is used to copy records, `copy-tree` copies trees made of records etc. * test/lisp/subr-tests.el (subr--copy-tree): Extend and strengthen the test considerably, using the print-circle trick to detect structure sharing precisely.
This commit is contained in:
parent
156973639c
commit
bd6bba4780
6 changed files with 72 additions and 47 deletions
|
@ -834,7 +834,7 @@ A FUNC form can have any number of `:no-eval' (or `:no-value'),
|
|||
: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]))
|
||||
:eval (copy-tree [1 (2 3) [4 5]] t))
|
||||
"Mapping Over Vectors"
|
||||
(mapcar
|
||||
:eval (mapcar #'identity [1 2 3]))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue