From 18aa807e60761a03ae4dab9d0056220078096cd0 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 19 Nov 1998 04:33:37 +0000 Subject: [PATCH] (gud-common-init): Use pop-to-buffer. (same-window-regexps): Add an element that matches all gud buffers. --- lisp/gud.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/gud.el b/lisp/gud.el index daa40daa6dc..501d19ebea2 100644 --- a/lisp/gud.el +++ b/lisp/gud.el @@ -2042,6 +2042,10 @@ comint mode, which see." (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 @@ comint mode, which see." (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. -- 2.39.2