diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-05-10 02:41:59 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-05-10 02:41:59 +0000 |
commit | 58684193b8c1d4bb994ed7500418ed6d15fc48c2 (patch) | |
tree | 8aa036f1f9b8e1efa37bef37d2b21c6f3cf25283 /lisp/gud.el | |
parent | 378f60427d16c0e84e27f2389374f00d347cc362 (diff) | |
download | emacs-58684193b8c1d4bb994ed7500418ed6d15fc48c2.tar.gz |
(gud-filter): Cal gud-display-frame even if process-window is nil.
Diffstat (limited to 'lisp/gud.el')
-rw-r--r-- | lisp/gud.el | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/gud.el b/lisp/gud.el index d24a6a441da..439484b60c8 100644 --- a/lisp/gud.el +++ b/lisp/gud.el @@ -1257,12 +1257,19 @@ It is saved for when this flag is not set.") (comint-output-filter proc output))) ;; Put the arrow on the source line. - :; This must be outside of the save-excursion + ;; This must be outside of the save-excursion ;; in case the source file is our current buffer. (if process-window (save-selected-window (select-window process-window) - (gud-display-frame))) + (gud-display-frame)) + ;; We have to be in the proper buffer, (process-buffer proc), + ;; but not in a save-excursion, because that would restore point. + (let ((old-buf (current-buffer))) + (set-buffer (process-buffer proc)) + (unwind-protect + (gud-display-frame) + (set-buffer old-buf)))) ;; If we deferred text that arrived during this processing, ;; handle it now. |