[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/eshell/esh-util.el
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/eshell/esh-util.el |
Date: |
Mon, 10 Jun 2002 05:02:54 -0400 |
Index: emacs/lisp/eshell/esh-util.el
diff -c emacs/lisp/eshell/esh-util.el:1.15 emacs/lisp/eshell/esh-util.el:1.16
*** emacs/lisp/eshell/esh-util.el:1.15 Mon Jun 10 04:33:13 2002
--- emacs/lisp/eshell/esh-util.el Mon Jun 10 05:02:54 2002
***************
*** 710,732 ****
(setq entry nil)))))))
(or entry (funcall handler 'file-attributes file)))))
! (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 (copy-sequence tree))))
! (while (consp p)
! (if (or (consp (car p)) (and vecp (vectorp (car p))))
! (setcar p (eshell-copy-tree (car p) vecp)))
! (or (listp (cdr p)) (setcdr p (eshell-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 (eshell-copy-tree (aref tree i) vecp))))))
! tree)
(defsubst eshell-processp (proc)
"If the `processp' function does not exist, PROC is not a process."
--- 710,716 ----
(setq entry nil)))))))
(or entry (funcall handler 'file-attributes file)))))
! (defalias 'eshell-copy-tree 'copy-tree)
(defsubst eshell-processp (proc)
"If the `processp' function does not exist, PROC is not a process."