changeset 30766:dacf4830a9a0

(comint-send-string, comint-send-region): Make into real functions. Snapshot the prompt before sending.
author Miles Bader <miles@gnu.org>
date Fri, 11 Aug 2000 19:15:51 +0000
parents 1e5a486b8b25
children 7dc7bfb39bca
files lisp/comint.el
diffstat 1 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/comint.el	Fri Aug 11 17:05:44 2000 +0000
+++ b/lisp/comint.el	Fri Aug 11 19:15:51 2000 +0000
@@ -1840,8 +1840,17 @@
 
 ;; 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