summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorColin Walters <walters@gnu.org>2002-06-08 22:32:06 +0000
committerColin Walters <walters@gnu.org>2002-06-08 22:32:06 +0000
commit7f050de0b349401f546b4624cbf957b6aff00144 (patch)
treed2830c3fa514528219a80c7440464b3becdfba5f /lisp/emacs-lisp
parenta7ed3f6a4e19597af265970854714c8b7ca70e5e (diff)
downloademacs-7f050de0b349401f546b4624cbf957b6aff00144.tar.gz
emacs-7f050de0b349401f546b4624cbf957b6aff00144.tar.bz2
emacs-7f050de0b349401f546b4624cbf957b6aff00144.zip
(cl-copy-tree): Moved to `copy-tree' in subr.el. Add a defalias with
the old name.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/cl-extra.el19
1 files changed, 1 insertions, 18 deletions
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el
index 194f6c6d9b4..ac206a84afd 100644
--- a/lisp/emacs-lisp/cl-extra.el
+++ b/lisp/emacs-lisp/cl-extra.el
@@ -565,24 +565,7 @@ If START or END is negative, it counts from the end."
(setq list (cdr list)))
(if (numberp sublist) (equal sublist list) (eq sublist list)))
-(defun cl-copy-tree (tree &optional vecp)
- "Make a copy of TREE.
-If TREE is a cons cell, this recursively copies both its car and its cdr.
-Contrast to copy-sequence, which copies only along the cdrs. With second
-argument VECP, this copies vectors as well as conses."
- (if (consp tree)
- (let ((p (setq tree (copy-list tree))))
- (while (consp p)
- (if (or (consp (car p)) (and vecp (vectorp (car p))))
- (setcar p (cl-copy-tree (car p) vecp)))
- (or (listp (cdr p)) (setcdr p (cl-copy-tree (cdr p) vecp)))
- (cl-pop p)))
- (if (and vecp (vectorp tree))
- (let ((i (length (setq tree (copy-sequence tree)))))
- (while (>= (setq i (1- i)) 0)
- (aset tree i (cl-copy-tree (aref tree i) vecp))))))
- tree)
-(defalias 'copy-tree 'cl-copy-tree)
+(defalias 'cl-copy-tree 'copy-tree)
;;; Property lists.