summaryrefslogtreecommitdiff
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorNick Roberts <nickrob@snap.net.nz>2007-10-01 11:28:21 +0000
committerNick Roberts <nickrob@snap.net.nz>2007-10-01 11:28:21 +0000
commit08aef629baba8f9349446848caf1d01f779f54c6 (patch)
tree82a69bc22e875820a2389f30d3c8a8f763c27ca2 /lisp/progmodes
parent1042a066d089a50246388805ab7575601a837597 (diff)
downloademacs-08aef629baba8f9349446848caf1d01f779f54c6.tar.gz
(gud-display-line): Find source buffer even when
GUD buffer has it's own frame.
Diffstat (limited to 'lisp/progmodes')
-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.")
;; process-buffer is current-buffer
(unwind-protect
(progn
- ;; Write something in *compilation* and hack its mode line,
+ ;; Write something in the GUD buffer and hack its mode line,
(set-buffer (process-buffer proc))
;; Fix the mode line.
(setq mode-line-process
@@ -2686,11 +2686,14 @@ Obeying it means displaying in another window the specified file and line."
(buffer
(with-current-buffer gud-comint-buffer
(gud-find-file true-file)))
- (window (and buffer (or (get-buffer-window buffer)
- (if (memq gud-minor-mode '(gdbmi gdba))
- (unless (gdb-display-source-buffer buffer)
- (gdb-display-buffer buffer nil)))
- (display-buffer buffer))))
+ (window (and buffer
+ (or (get-buffer-window buffer)
+ (if (memq gud-minor-mode '(gdbmi gdba))
+ (or (if (get-buffer-window buffer 0)
+ (display-buffer buffer nil 0))
+ (unless (gdb-display-source-buffer buffer)
+ (gdb-display-buffer buffer nil))))
+ (display-buffer buffer))))
(pos))
(if buffer
(progn