From: Richard M. Stallman Date: Fri, 12 Sep 2003 01:03:37 +0000 (+0000) Subject: (Building Lists): Add copy-tree. X-Git-Tag: ttn-vms-21-2-B4~8856 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=84c3f2480e5bb644f10616b4eb402adc4833c8c1;p=emacs.git (Building Lists): Add copy-tree. --- diff --git a/lispref/lists.texi b/lispref/lists.texi index e68d1658a8b..b437916694f 100644 --- a/lispref/lists.texi +++ b/lispref/lists.texi @@ -733,6 +733,18 @@ The function @code{delq} offers a way to perform this operation destructively. See @ref{Sets And Lists}. @end defun +@defun copy-tree tree &optional vecp +This function returns a copy the tree @code{tree}. If @var{tree} is a +cons cell, this makes a new cons cell with the same @sc{car} and +@sc{cdr}, then recursively copies the @sc{car} and @sc{cdr} in the +same way. + +Normally, when @var{tree} is anything other than a cons cell, +@code{copy-tree} simply returns @var{tree}. However, if @var{vecp} is +non-@code{nil}, it copies vectors too (and operates recursively on +their elements). +@end defun + @defun number-sequence from to &optional separation This returns a list of numbers starting with @var{from} and incrementing by @var{separation} (or by 1 if @var{separation}