diff options
| author | Richard M. Stallman | 2003-09-12 01:03:37 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2003-09-12 01:03:37 +0000 |
| commit | 84c3f2480e5bb644f10616b4eb402adc4833c8c1 (patch) | |
| tree | c173f3431bb1f6fb63cc761435333c881e358208 | |
| parent | f6cad0895d9e349c1edd3ed64544665879df84b3 (diff) | |
| download | emacs-84c3f2480e5bb644f10616b4eb402adc4833c8c1.tar.gz emacs-84c3f2480e5bb644f10616b4eb402adc4833c8c1.zip | |
(Building Lists): Add copy-tree.
| -rw-r--r-- | lispref/lists.texi | 12 |
1 files changed, 12 insertions, 0 deletions
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 | |||
| 733 | destructively. See @ref{Sets And Lists}. | 733 | destructively. See @ref{Sets And Lists}. |
| 734 | @end defun | 734 | @end defun |
| 735 | 735 | ||
| 736 | @defun copy-tree tree &optional vecp | ||
| 737 | This function returns a copy the tree @code{tree}. If @var{tree} is a | ||
| 738 | cons cell, this makes a new cons cell with the same @sc{car} and | ||
| 739 | @sc{cdr}, then recursively copies the @sc{car} and @sc{cdr} in the | ||
| 740 | same way. | ||
| 741 | |||
| 742 | Normally, when @var{tree} is anything other than a cons cell, | ||
| 743 | @code{copy-tree} simply returns @var{tree}. However, if @var{vecp} is | ||
| 744 | non-@code{nil}, it copies vectors too (and operates recursively on | ||
| 745 | their elements). | ||
| 746 | @end defun | ||
| 747 | |||
| 736 | @defun number-sequence from to &optional separation | 748 | @defun number-sequence from to &optional separation |
| 737 | This returns a list of numbers starting with @var{from} | 749 | This returns a list of numbers starting with @var{from} |
| 738 | and incrementing by @var{separation} (or by 1 if @var{separation} | 750 | and incrementing by @var{separation} (or by 1 if @var{separation} |