From 79e8dca7df9b65cea3843e5a9b5fed9bdb106747 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 11 Aug 2000 19:17:18 +0000 Subject: [PATCH] (comint-send-string, comint-send-region): Make into real functions. Snapshot the prompt before sending. --- lisp/ChangeLog | 5 +++++ lisp/comint.el | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 691a611178c..cfcdb82d84a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2000-08-12 Miles Bader + + * comint.el (comint-send-string, comint-send-region): Make into + real functions. Snapshot the prompt before sending. + 2000-08-11 Eli Zaretskii * info.el (Info-find-emacs-command-nodes): Rewrite to use diff --git a/lisp/comint.el b/lisp/comint.el index f890090c29a..1f0845d9ade 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1840,8 +1840,17 @@ This function could be in the list `comint-output-filter-functions'." ;; Low-level process communication -(defalias 'comint-send-string 'process-send-string) -(defalias 'comint-send-region 'process-send-region) +(defun comint-send-string (process string) + "Like `process-send-string', but also does extra bookkeeping for comint mode." + (with-current-buffer (process-buffer process) + (comint-snapshot-last-prompt)) + (process-send-string process string)) + +(defun comint-send-region (process start end) + "Like `process-send-region', but also does extra bookkeeping for comint mode." + (with-current-buffer (process-buffer process) + (comint-snapshot-last-prompt)) + (process-send-region process start end)) ;; Random input hackage -- 2.39.2