From: Nick Roberts Date: Mon, 1 Oct 2007 11:28:21 +0000 (+0000) Subject: (gud-display-line): Find source buffer even when X-Git-Tag: emacs-pretest-22.1.90~709 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=08aef629baba8f9349446848caf1d01f779f54c6;p=emacs.git (gud-display-line): Find source buffer even when GUD buffer has it's own frame. --- 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