aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/eshell
diff options
context:
space:
mode:
authorJohn Wiegley2005-05-27 02:57:18 +0000
committerJohn Wiegley2005-05-27 02:57:18 +0000
commit6b6f91b357f6fe2f1e0d72f046a1b8d8a2d6d8c3 (patch)
treecea28fba7cc58871cf937fd7799bd44e8b8834da /lisp/eshell
parent9c041409339fbd92ca875ba034bcf8ca3410330e (diff)
downloademacs-6b6f91b357f6fe2f1e0d72f046a1b8d8a2d6d8c3.tar.gz
emacs-6b6f91b357f6fe2f1e0d72f046a1b8d8a2d6d8c3.zip
(eshell-eval-command): If the return value of `eshell-resume-eval' is
wrapped in a list, it indicates that the command was run asynchronously. In that case, unwrap the value before checking the delimiter value.
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/esh-cmd.el9
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el
index d7c65066ac6..355369d35ae 100644
--- a/lisp/eshell/esh-cmd.el
+++ b/lisp/eshell/esh-cmd.el
@@ -757,7 +757,7 @@ nil)' if none)."
757 757
758(defmacro eshell-do-subjob (object) 758(defmacro eshell-do-subjob (object)
759 "Evaluate a command OBJECT as a subjob. 759 "Evaluate a command OBJECT as a subjob.
760We indicate thet the process was run in the background by returned it 760We indicate that the process was run in the background by returning it
761ensconced in a list." 761ensconced in a list."
762 `(let ((eshell-current-subjob-p t)) 762 `(let ((eshell-current-subjob-p t))
763 ,object)) 763 ,object))
@@ -1006,11 +1006,10 @@ at the moment are:
1006 (eshell-resume-eval)))) 1006 (eshell-resume-eval))))
1007 ;; On systems that don't support async subprocesses, eshell-resume 1007 ;; On systems that don't support async subprocesses, eshell-resume
1008 ;; can return t. Don't treat that as an error. 1008 ;; can return t. Don't treat that as an error.
1009 (if (listp delim)
1010 (setq delim (car delim)))
1009 (if (and delim (not (eq delim t))) 1011 (if (and delim (not (eq delim t)))
1010 (error "Unmatched delimiter: %c" 1012 (error "Unmatched delimiter: %c" delim)))))
1011 (if (listp delim)
1012 (car delim)
1013 delim))))))
1014 1013
1015(defun eshell-resume-command (proc status) 1014(defun eshell-resume-command (proc status)
1016 "Resume the current command when a process ends." 1015 "Resume the current command when a process ends."