# HG changeset patch # User Richard M. Stallman # Date 813432035 0 # Node ID 1e174c7e3a009035236f2133d97598573945b003 # Parent 104d1e97803cdd96db63be24f1ec7328ab621536 (gud-filter): Move the gud-display-frame call outside of the save-excursion. New var process-window controls which window to do it in. diff -r 104d1e97803c -r 1e174c7e3a00 lisp/gud.el --- a/lisp/gud.el Wed Oct 11 17:18:51 1995 +0000 +++ b/lisp/gud.el Wed Oct 11 17:20:35 1995 +0000 @@ -1188,7 +1188,7 @@ (defun gud-filter (proc string) ;; Here's where the actual buffer insertion is done - (let (output) + (let (output process-window) (if (buffer-name (process-buffer proc)) (if gud-filter-defer-flag ;; If we can't process any text now, @@ -1216,17 +1216,23 @@ ;; Don't display the specified file ;; unless (1) point is at or after the position where output appears ;; and (2) this buffer is on the screen. - (if (and gud-last-frame - (>= (point) (process-mark proc)) - (get-buffer-window (current-buffer))) - (gud-display-frame)) - ;; Let the comint filter do the actual insertion. - ;; That lets us inherit various comint features. - (comint-output-filter proc output)) - ;; If we deferred text that arrived during this processing, - ;; handle it now. - (if gud-filter-pending-text - (gud-filter proc ""))))))) + (setq process-window + (and gud-last-frame + (>= (point) (process-mark proc)) + (get-buffer-window (current-buffer)))))) + (if process-window + (save-selected-window + (select-window process-window) + (gud-display-frame))) + + ;; Let the comint filter do the actual insertion. + ;; That lets us inherit various comint features. + (comint-output-filter proc output) + + ;; If we deferred text that arrived during this processing, + ;; handle it now. + (if gud-filter-pending-text + (gud-filter proc "")))))) (defun gud-sentinel (proc msg) (cond ((null (buffer-name (process-buffer proc)))