aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/eshell
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2002-06-10 08:33:13 +0000
committerRichard M. Stallman <[email protected]>2002-06-10 08:33:13 +0000
commita9304a86df1fdcd59e88cf773a0238418b3fddd0 (patch)
tree48895a2004561e06f89777cf7ea2d15d237537f2 /lisp/eshell
parent48e889be9af0f7ad425237758b5beaa7c8747bf8 (diff)
(eshell-copy-list): Function deleted.
(eshell-sublist, eshell-copy-tree): Use copy-sequence.
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/esh-util.el13
1 files changed, 2 insertions, 11 deletions
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el
index 26de0a55ee..c73d094020 100644
--- a/lisp/eshell/esh-util.el
+++ b/lisp/eshell/esh-util.el
@@ -236,7 +236,7 @@ then quoting is done by a backslash, rather than a doubled delimiter."
(defun eshell-sublist (l &optional n m)
"Return from LIST the N to M elements.
If N or M is nil, it means the end of the list."
- (let* ((a (eshell-copy-list l))
+ (let* ((a (copy-sequence l))
result)
(if (and m (consp (nthcdr m a)))
(setcdr (nthcdr m a) nil))
@@ -710,22 +710,13 @@ Unless optional argument INPLACE is non-nil, return a new string."
(setq entry nil)))))))
(or entry (funcall handler 'file-attributes file)))))
-(defun eshell-copy-list (list)
- "Return a copy of a list, which may be a dotted list.
-The elements of the list are not copied, just the list structure itself."
- (if (consp list)
- (let ((res nil))
- (while (consp list) (push (pop list) res))
- (prog1 (nreverse res) (setcdr res list)))
- (car list)))
-
(defun eshell-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 (eshell-copy-list tree))))
+ (let ((p (setq tree (copy-sequence tree))))
(while (consp p)
(if (or (consp (car p)) (and vecp (vectorp (car p))))
(setcar p (eshell-copy-tree (car p) vecp)))