# HG changeset patch # User Richard M. Stallman # Date 831696119 0 # Node ID c595cb576143c2e740b35696738447daeb4ed678 # Parent fd47674bb3a72eda29059c0c82844719deec1c33 (gud-filter): Cal gud-display-frame even if process-window is nil. diff -r fd47674bb3a7 -r c595cb576143 lisp/gud.el --- a/lisp/gud.el Thu May 09 23:42:08 1996 +0000 +++ b/lisp/gud.el Fri May 10 02:41:59 1996 +0000 @@ -1257,12 +1257,19 @@ (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.