Function: eshell-resume-eval
eshell-resume-eval is a byte-compiled function defined in
esh-cmd.el.gz.
Signature
(eshell-resume-eval COMMAND)
Documentation
Destructively evaluate a COMMAND which may need to be deferred.
COMMAND is a command entry of the form (BACKGROUND FORM
PROCESSES) (see eshell-add-command).
Return the result of COMMAND's FORM if it wasn't deferred. If BACKGROUND is non-nil and Eshell defers COMMAND, return a list of the form (:eshell-background . PROCESSES).
Source Code
;; Defined in /usr/src/emacs/lisp/eshell/esh-cmd.el.gz
(defun eshell-resume-eval (command)
"Destructively evaluate a COMMAND which may need to be deferred.
COMMAND is a command entry of the form (BACKGROUND FORM
PROCESSES) (see `eshell-add-command').
Return the result of COMMAND's FORM if it wasn't deferred. If
BACKGROUND is non-nil and Eshell defers COMMAND, return a list of
the form (:eshell-background . PROCESSES)."
(eshell-condition-case err
(let (retval procs)
(unwind-protect
(progn
(setq procs
(catch 'eshell-defer
(ignore (setq retval (eshell-do-eval (cadr command))))))
(cond
(retval (cadr retval))
((car command) (cons :eshell-background procs))))
(if procs
(setf (nth 2 command) procs)
;; If we didn't defer this command, clear it out. This
;; applies both when the command has finished normally,
;; and when a signal or thrown value causes us to unwind.
(eshell-remove-command command))))
(error
(error (error-message-string err)))))