]> git.eshelyaron.com Git - emacs.git/commitdiff
(comint-send-string, comint-send-region): Make into real functions.
authorMiles Bader <miles@gnu.org>
Fri, 11 Aug 2000 19:17:18 +0000 (19:17 +0000)
committerMiles Bader <miles@gnu.org>
Fri, 11 Aug 2000 19:17:18 +0000 (19:17 +0000)
Snapshot the prompt before sending.

lisp/ChangeLog
lisp/comint.el

index 691a611178c9f097424dff29ad49d9928145f752..cfcdb82d84a5bad0a770c708da5b2e1333eeded4 100644 (file)
@@ -1,3 +1,8 @@
+2000-08-12  Miles Bader  <miles@gnu.org>
+
+       * comint.el (comint-send-string, comint-send-region): Make into
+       real functions.  Snapshot the prompt before sending.
+
 2000-08-11  Eli Zaretskii  <eliz@is.elta.co.il>
 
        * info.el (Info-find-emacs-command-nodes): Rewrite to use
index f890090c29aaade1d5fe0268cd959e9bb0fd4743..1f0845d9adefd8e53a5ef801ae235dd8c943acd1 100644 (file)
@@ -1840,8 +1840,17 @@ This function could be in the list `comint-output-filter-functions'."
 \f
 ;; 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))
 \f
 ;; Random input hackage