diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-10-11 17:20:35 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-10-11 17:20:35 +0000 |
commit | e2fa66a1e3733af2cd94af56e417ce7ac17df572 (patch) | |
tree | 358d618057e67789b652545af1b289fb6f55398b /lisp/gud.el | |
parent | e28a385d7af78d6882c52c066b9ae4f00c67eaa2 (diff) | |
download | emacs-e2fa66a1e3733af2cd94af56e417ce7ac17df572.tar.gz |
(gud-filter): Move the gud-display-frame call
outside of the save-excursion. New var process-window
controls which window to do it in.
Diffstat (limited to 'lisp/gud.el')
-rw-r--r-- | lisp/gud.el | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/lisp/gud.el b/lisp/gud.el index 787d7e74bc2..17ff347949c 100644 --- a/lisp/gud.el +++ b/lisp/gud.el @@ -1188,7 +1188,7 @@ It is saved for when this flag is not set.") (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 @@ It is saved for when this flag is not set.") ;; 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))) |