aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/lists.texi14
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi
index f3758f5ce60..911defbc211 100644
--- a/doc/lispref/lists.texi
+++ b/doc/lispref/lists.texi
@@ -705,9 +705,21 @@ same way.
705Normally, when @var{tree} is anything other than a cons cell, 705Normally, when @var{tree} is anything other than a cons cell,
706@code{copy-tree} simply returns @var{tree}. However, if @var{vecp} is 706@code{copy-tree} simply returns @var{tree}. However, if @var{vecp} is
707non-@code{nil}, it copies vectors too (and operates recursively on 707non-@code{nil}, it copies vectors too (and operates recursively on
708their elements). 708their elements). This function cannot cope with circular lists.
709@end defun 709@end defun
710 710
711@defun safe-copy-tree tree &optional vecp
712This function returns a copy of the tree @var{tree}. If @var{tree} is
713a cons cell, this make a new cons cell with the same @sc{car} and
714@sc{cdr}, then recursively copies the @sc{car} and @sc{cdr} in the
715same way.
716
717Normally, when @var{tree} is anything other than a cons cell,
718@code{copy-tree} simply returns @var{tree}. However, if @var{vecp} is
719non-@code{nil}, it copies vectors and records too (and operates
720recursively on their elements). This function handles circular lists
721and vectors, and is thus slower than @code{copy-tree} for typical cases.
722
711@defun flatten-tree tree 723@defun flatten-tree tree
712This function returns a ``flattened'' copy of @var{tree}, that is, 724This function returns a ``flattened'' copy of @var{tree}, that is,
713a list containing all the non-@code{nil} terminal nodes, or leaves, of 725a list containing all the non-@code{nil} terminal nodes, or leaves, of