# HG changeset patch # User Nick Roberts # Date 1152827825 0 # Node ID 30e3082c1a7e6b331eff2da1fb1fa1d193487d0f # Parent 28ec37c2aa2c468e62b1dcd4c5734f923e59ba68 (gud-display-line): Use gdb-display-buffer. Set gdb-source-window. diff -r 28ec37c2aa2c -r 30e3082c1a7e lisp/progmodes/gud.el --- a/lisp/progmodes/gud.el Thu Jul 13 21:56:26 2006 +0000 +++ b/lisp/progmodes/gud.el Thu Jul 13 21:57:05 2006 +0000 @@ -2763,7 +2763,8 @@ (gud-find-file true-file))) (window (and buffer (or (get-buffer-window buffer) (if (memq gud-minor-mode '(gdbmi gdba)) - (gdb-display-source-buffer buffer)) + (unless (gdb-display-source-buffer buffer) + (gdb-display-buffer buffer nil))) (display-buffer buffer)))) (pos)) (if buffer @@ -2793,7 +2794,10 @@ (cond ((or (< pos (point-min)) (> pos (point-max))) (widen) (goto-char pos)))) - (if window (set-window-point window gud-overlay-arrow-position)))))) + (when window + (set-window-point window gud-overlay-arrow-position) + (if (memq gud-minor-mode '(gdbmi gdba)) + (setq gdb-source-window window))))))) ;; The gud-call function must do the right thing whether its invoking ;; keystroke is from the GUD buffer itself (via major-mode binding)