# HG changeset patch # User Richard M. Stallman # Date 911450017 0 # Node ID 9392dd2e613736e5fdbf97295591b3a29cf14722 # Parent 44546fc7faad94cb28eae1fccc81d0e292706d77 (gud-common-init): Use pop-to-buffer. (same-window-regexps): Add an element that matches all gud buffers. diff -r 44546fc7faad -r 9392dd2e6137 lisp/gud.el --- a/lisp/gud.el Thu Nov 19 04:30:14 1998 +0000 +++ b/lisp/gud.el Thu Nov 19 04:33:37 1998 +0000 @@ -2042,6 +2042,10 @@ (setq words (cons (substring string beg) words))) (nreverse words))) +;; Cause our buffers to be displayed, by default, +;; in the selected window. +;;;###autoload (add-hook 'same-window-regexps "\\*gud-.*\\*\\(\\|<[0-9]+>\\)") + ;; Perform initializations common to all debuggers. ;; The first arg is the specified command line, ;; which starts with the program to debug. @@ -2072,7 +2076,7 @@ (expand-file-name file-subst) file-subst))) (filepart (and file-word (concat "-" (file-name-nondirectory file))))) - (switch-to-buffer (concat "*gud" filepart "*")) + (pop-to-buffer (concat "*gud" filepart "*")) ;; Set default-directory to the file's directory. (and file-word ;; Don't set default-directory if no directory was specified.