changeset 77073:1248605d9e44

(gdb): Restore existing session if user tries to start a second one in graphical mode.
author Nick Roberts <nickrob@snap.net.nz>
date Mon, 09 Apr 2007 06:52:30 +0000
parents 2a5d9704a6f6
children ae905157685c
files lisp/progmodes/gud.el
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/gud.el	Mon Apr 09 06:51:32 2007 +0000
+++ b/lisp/progmodes/gud.el	Mon Apr 09 06:52:30 2007 +0000
@@ -723,14 +723,13 @@
 session."
   (interactive (list (gud-query-cmdline 'gdb)))
 
-  (if (and gud-comint-buffer
+  (when (and gud-comint-buffer
 	   (buffer-name gud-comint-buffer)
 	   (get-buffer-process gud-comint-buffer)
 	   (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)))
-      (let ((same-window-regexps))
-	(display-buffer gud-comint-buffer)
+	(gdb-restore-windows)
 	(error
-	 "Multiple debugging requires restarting in text command mode")))
+	 "Multiple debugging requires restarting in text command mode"))
 
   (gud-common-init command-line nil 'gud-gdb-marker-filter)
   (set (make-local-variable 'gud-minor-mode) 'gdb)