From dcdc526cc3fb50399ee82bc9f1f6cd78fb06b7c5 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 25 Jun 1994 22:27:06 +0000 Subject: [PATCH] (comint-send-input): Update markers before actually sending the input. --- lisp/comint.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/comint.el b/lisp/comint.el index 010889678ff..3a343303598 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1137,11 +1137,13 @@ Similarly for Soar, Scheme, etc." (while functions (funcall (car functions) (concat input "\n")) (setq functions (cdr functions)))) - (funcall comint-input-sender proc input) (setq comint-input-ring-index nil) + ;; Update the markers before we send the input + ;; in case we get output amidst sending the input. (set-marker comint-last-input-start pmark) (set-marker comint-last-input-end (point)) (set-marker (process-mark proc) (point)) + (funcall comint-input-sender proc input) (comint-output-filter proc ""))))) ;; The purpose of using this filter for comint processes -- 2.39.5