aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/gud.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index abe61929abe..4ec478dbf62 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -2630,7 +2630,7 @@ It is saved for when this flag is not set.")
2630 ;; process-buffer is current-buffer 2630 ;; process-buffer is current-buffer
2631 (unwind-protect 2631 (unwind-protect
2632 (progn 2632 (progn
2633 ;; Write something in *compilation* and hack its mode line, 2633 ;; Write something in the GUD buffer and hack its mode line,
2634 (set-buffer (process-buffer proc)) 2634 (set-buffer (process-buffer proc))
2635 ;; Fix the mode line. 2635 ;; Fix the mode line.
2636 (setq mode-line-process 2636 (setq mode-line-process
@@ -2686,11 +2686,14 @@ Obeying it means displaying in another window the specified file and line."
2686 (buffer 2686 (buffer
2687 (with-current-buffer gud-comint-buffer 2687 (with-current-buffer gud-comint-buffer
2688 (gud-find-file true-file))) 2688 (gud-find-file true-file)))
2689 (window (and buffer (or (get-buffer-window buffer) 2689 (window (and buffer
2690 (if (memq gud-minor-mode '(gdbmi gdba)) 2690 (or (get-buffer-window buffer)
2691 (unless (gdb-display-source-buffer buffer) 2691 (if (memq gud-minor-mode '(gdbmi gdba))
2692 (gdb-display-buffer buffer nil))) 2692 (or (if (get-buffer-window buffer 0)
2693 (display-buffer buffer)))) 2693 (display-buffer buffer nil 0))
2694 (unless (gdb-display-source-buffer buffer)
2695 (gdb-display-buffer buffer nil))))
2696 (display-buffer buffer))))
2694 (pos)) 2697 (pos))
2695 (if buffer 2698 (if buffer
2696 (progn 2699 (progn