/[emacs]/emacs/lisp/eshell/esh-util.el
ViewVC logotype

Diff of /emacs/lisp/eshell/esh-util.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15 by rms, Mon Jun 10 08:33:13 2002 UTC revision 1.16 by rms, Mon Jun 10 09:02:54 2002 UTC
# Line 710  Unless optional argument INPLACE is non- Line 710  Unless optional argument INPLACE is non-
710                        (setq entry nil)))))))                        (setq entry nil)))))))
711        (or entry (funcall handler 'file-attributes file)))))        (or entry (funcall handler 'file-attributes file)))))
712    
713  (defun eshell-copy-tree (tree &optional vecp)  (defalias 'eshell-copy-tree 'copy-tree)
   "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)  
714    
715  (defsubst eshell-processp (proc)  (defsubst eshell-processp (proc)
716    "If the `processp' function does not exist, PROC is not a process."    "If the `processp' function does not exist, PROC is not a process."

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26