diff lisp/eshell/esh-util.el @ 31240:10b1c85c0bbe

See ChangeLog
author John Wiegley <johnw@newartisans.com>
date Tue, 29 Aug 2000 00:37:10 +0000
parents 34b1ab9d583d
children 3099993cba0f
line wrap: on
line diff
--- a/lisp/eshell/esh-util.el	Mon Aug 28 23:48:02 2000 +0000
+++ b/lisp/eshell/esh-util.el	Tue Aug 29 00:37:10 2000 +0000
@@ -262,7 +262,7 @@
 
 (put 'eshell-for 'lisp-indent-function 2)
 
-(defun eshell-flatten-list (args)
+(defsubst eshell-flatten-list (args)
   "Flatten any lists within ARGS, so that there are no sublists."
   (let ((new-list (list t)))
     (eshell-for a args
@@ -417,7 +417,8 @@
 		  (split-string (buffer-substring
 				 (point) (progn (end-of-line)
 						(point))) ":")))
-	    (if (and fields (nth 0 fields) (nth 2 fields))
+	    (if (and (and fields (nth 0 fields) (nth 2 fields))
+		     (not (assq (string-to-int (nth 2 fields)) names)))
 		(setq names (cons (cons (string-to-int (nth 2 fields))
 					(nth 0 fields))
 				  names))))
@@ -606,6 +607,10 @@
 	    (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."
+  (and (fboundp 'processp) (processp proc)))
+
 ; (defun eshell-copy-file
 ;   (file newname &optional ok-if-already-exists keep-date)
 ;   "Copy FILE to NEWNAME.  See docs for `copy-file'."