From: Jim Porter Date: Thu, 30 May 2024 00:27:01 +0000 (-0700) Subject: ; Improve recent change to deferred evaluation in Eshell X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=16ab190fc53c3f445a6fc30dec33d6660c5af5c7;p=emacs.git ; Improve recent change to deferred evaluation in Eshell * lisp/eshell/esh-cmd.el (eshell-do-eval): Move active check later. (cherry picked from commit 6a0f4d333a35543cd99bd88e053995a44020dadb) --- diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index 1072646ec15..a093b7face9 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el @@ -1282,14 +1282,13 @@ have been replaced by constants." (setcdr form (cdr new-form))) (eshell-do-eval form synchronous-p)) (if-let (((memq (car form) eshell-deferrable-commands)) - (procs (eshell-make-process-list result)) - (active (seq-some #'eshell-process-active-p procs))) + (procs (eshell-make-process-list result))) (if synchronous-p (apply #'eshell/wait procs) (eshell-manipulate form "inserting ignore form" (setcar form 'ignore) (setcdr form nil)) - (when active + (when (seq-some #'eshell-process-active-p procs) (throw 'eshell-defer procs))) (list 'quote result))))))))))))