From: Richard M. Stallman Date: Thu, 19 Nov 1998 04:33:37 +0000 (+0000) Subject: (gud-common-init): Use pop-to-buffer. X-Git-Tag: emacs-20.4~1214 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=18aa807e60761a03ae4dab9d0056220078096cd0;p=emacs.git (gud-common-init): Use pop-to-buffer. (same-window-regexps): Add an element that matches all gud buffers. --- 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.