]> git.eshelyaron.com Git - emacs.git/commitdiff
; Improve recent change to deferred evaluation in Eshell
authorJim Porter <jporterbugs@gmail.com>
Thu, 30 May 2024 00:27:01 +0000 (17:27 -0700)
committerEshel Yaron <me@eshelyaron.com>
Thu, 30 May 2024 14:27:58 +0000 (16:27 +0200)
* lisp/eshell/esh-cmd.el (eshell-do-eval): Move active check later.

(cherry picked from commit 6a0f4d333a35543cd99bd88e053995a44020dadb)

lisp/eshell/esh-cmd.el

index 1072646ec15fad81b28c940671589f30a0092276..a093b7face98ea20eef7a505dab4e504c294b6f5 100644 (file)
@@ -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))))))))))))