]> git.eshelyaron.com Git - emacs.git/commitdiff
(gud-filter): Cal gud-display-frame even if process-window is nil.
authorRichard M. Stallman <rms@gnu.org>
Fri, 10 May 1996 02:41:59 +0000 (02:41 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 10 May 1996 02:41:59 +0000 (02:41 +0000)
lisp/gud.el

index d24a6a441daad478f1d2848e042d8708dc45f2f3..439484b60c860b226ec23590bb7599618b22aaaf 100644 (file)
@@ -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.