diff options
| author | Richard M. Stallman | 2002-06-10 09:02:54 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-06-10 09:02:54 +0000 |
| commit | efbddb8e15e38b64460216dbef17208b5660d414 (patch) | |
| tree | f89ba7054806af371645ecb49fd5de9255503d64 | |
| parent | cfebd4db43b449b6bee133066de78346151a7e5c (diff) | |
| download | emacs-efbddb8e15e38b64460216dbef17208b5660d414.tar.gz emacs-efbddb8e15e38b64460216dbef17208b5660d414.zip | |
(eshell-copy-tree): Make it an alias for copy-tree.
| -rw-r--r-- | lisp/eshell/esh-util.el | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index c73d0940200..ef4bcda31a0 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el | |||
| @@ -710,23 +710,7 @@ Unless optional argument INPLACE is non-nil, return a new string." | |||
| 710 | (setq entry nil))))))) | 710 | (setq entry nil))))))) |
| 711 | (or entry (funcall handler 'file-attributes file))))) | 711 | (or entry (funcall handler 'file-attributes file))))) |
| 712 | 712 | ||
| 713 | (defun eshell-copy-tree (tree &optional vecp) | 713 | (defalias 'eshell-copy-tree 'copy-tree) |
| 714 | "Make a copy of TREE. | ||
| 715 | If TREE is a cons cell, this recursively copies both its car and its cdr. | ||
| 716 | Contrast to copy-sequence, which copies only along the cdrs. With second | ||
| 717 | argument VECP, this copies vectors as well as conses." | ||
| 718 | (if (consp tree) | ||
| 719 | (let ((p (setq tree (copy-sequence tree)))) | ||
| 720 | (while (consp p) | ||
| 721 | (if (or (consp (car p)) (and vecp (vectorp (car p)))) | ||
| 722 | (setcar p (eshell-copy-tree (car p) vecp))) | ||
| 723 | (or (listp (cdr p)) (setcdr p (eshell-copy-tree (cdr p) vecp))) | ||
| 724 | (cl-pop p))) | ||
| 725 | (if (and vecp (vectorp tree)) | ||
| 726 | (let ((i (length (setq tree (copy-sequence tree))))) | ||
| 727 | (while (>= (setq i (1- i)) 0) | ||
| 728 | (aset tree i (eshell-copy-tree (aref tree i) vecp)))))) | ||
| 729 | tree) | ||
| 730 | 714 | ||
| 731 | (defsubst eshell-processp (proc) | 715 | (defsubst eshell-processp (proc) |
| 732 | "If the `processp' function does not exist, PROC is not a process." | 716 | "If the `processp' function does not exist, PROC is not a process." |