summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1994-03-15 04:17:18 +0000
committerKarl Heuer <kwzh@gnu.org>1994-03-15 04:17:18 +0000
commit697d0646db42f483a14718b47d22ed5e1d998b2d (patch)
tree85b870376598a1ef60bf0d1e4d4bf28a138de712 /lisp
parent6449ac07998a2c55fd1beb5733e4a283980f8de0 (diff)
downloademacs-697d0646db42f483a14718b47d22ed5e1d998b2d.tar.gz
(gud-filter): Update comint-last-input-end.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gud.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/lisp/gud.el b/lisp/gud.el
index 7e1c3180953..843999c4c31 100644
--- a/lisp/gud.el
+++ b/lisp/gud.el
@@ -841,6 +841,9 @@ comint mode, which see."
;; into the buffer. The hard work is done by the method that is
;; the value of gud-marker-filter.
+;; Rather than duplicating all the work of comint-output-filter, perhaps
+;; gud-filter should be implemented by adding appropriate hooks to
+;; comint-output-filter. Would somebody like to volunteer to do that?
(defun gud-filter (proc string)
;; Here's where the actual buffer insertion is done
(let ((inhibit-quit t))
@@ -854,7 +857,13 @@ comint mode, which see."
(progn
(delete-region (point) gud-delete-prompt-marker)
(set-marker gud-delete-prompt-marker nil)))
- (insert-before-markers (gud-marker-filter string))
+ (setq string (gud-marker-filter string))
+ (insert-before-markers string)
+ (and comint-last-input-end
+ (marker-buffer comint-last-input-end)
+ (= (point) comint-last-input-end)
+ (set-marker comint-last-input-end
+ (- comint-last-input-end (length string))))
(setq moving (= (point) (process-mark proc)))
(setq output-after-point (< (point) (process-mark proc)))
;; Check for a filename-and-line number.