aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/eshell
diff options
context:
space:
mode:
authorPo Lu2024-07-12 12:15:50 +0800
committerPo Lu2024-07-12 12:15:50 +0800
commit38fa3e9350134fb69655e1e9b8e6d95a2dbcf3db (patch)
treeaa591c4a1b14c45d6f4a68f9646b4668c0b91199 /lisp/eshell
parentdc8cde2b6f3e7c55a85439c771284df2b4fa0e37 (diff)
parenta5ef9e25680d490e2a453e5ed518aba8f4560b2d (diff)
downloademacs-38fa3e9350134fb69655e1e9b8e6d95a2dbcf3db.tar.gz
emacs-38fa3e9350134fb69655e1e9b8e6d95a2dbcf3db.zip
Merge from savannah/emacs-30
a5ef9e25680 Document means of executing Emacs from unrelated Android ... 0de0056fd6b Don't emit a prompt in Eshell when a background command i... ec1e300a215 Fix reference from buffer-stale-function docstring
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/esh-cmd.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el
index b936f68a57a..c8579c83405 100644
--- a/lisp/eshell/esh-cmd.el
+++ b/lisp/eshell/esh-cmd.el
@@ -1030,6 +1030,9 @@ process(es) in a cons cell like:
1030PROC is the process that invoked this from its sentinel, and 1030PROC is the process that invoked this from its sentinel, and
1031STATUS is its status." 1031STATUS is its status."
1032 (when proc 1032 (when proc
1033 ;; Iterate over all the commands associated with this process. Each
1034 ;; element is a list of the form (BACKGROUND FORM PROCESSES) (see
1035 ;; `eshell-add-command').
1033 (dolist (command (eshell-commands-for-process proc)) 1036 (dolist (command (eshell-commands-for-process proc))
1034 (unless (seq-some #'eshell-process-active-p (nth 2 command)) 1037 (unless (seq-some #'eshell-process-active-p (nth 2 command))
1035 (setf (nth 2 command) nil) ; Clear processes from command. 1038 (setf (nth 2 command) nil) ; Clear processes from command.
@@ -1040,8 +1043,12 @@ STATUS is its status."
1040 (not (string-match eshell-reset-signals status))) 1043 (not (string-match eshell-reset-signals status)))
1041 (eshell-resume-eval command) 1044 (eshell-resume-eval command)
1042 (eshell-remove-command command) 1045 (eshell-remove-command command)
1043 (declare-function eshell-reset "esh-mode" (&optional no-hooks)) 1046 ;; Check if the command we just aborted is marked as a
1044 (eshell-reset)))))) 1047 ;; background command. If not, we need to reset the prompt so
1048 ;; the user can enter another command.
1049 (unless (car command)
1050 (declare-function eshell-reset "esh-mode" (&optional no-hooks))
1051 (eshell-reset)))))))
1045 1052
1046(defun eshell-resume-eval (command) 1053(defun eshell-resume-eval (command)
1047 "Destructively evaluate a COMMAND which may need to be deferred. 1054 "Destructively evaluate a COMMAND which may need to be deferred.