# HG changeset patch # User Karl Heuer # Date 763705038 0 # Node ID 405402ff82cbce9c0e86bef0465d7cec94970fc9 # Parent 4cab647064a8f2a7207b4e7b3bcc1f1bac6213f3 (gud-filter): Update comint-last-input-end. diff -r 4cab647064a8 -r 405402ff82cb lisp/gud.el --- a/lisp/gud.el Tue Mar 15 03:59:11 1994 +0000 +++ b/lisp/gud.el Tue Mar 15 04:17:18 1994 +0000 @@ -841,6 +841,9 @@ ;; 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 @@ (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.