summaryrefslogtreecommitdiff
path: root/lisp/window.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2011-09-10 17:15:28 -0400
committerChong Yidong <cyd@stupidchicken.com>2011-09-10 17:15:28 -0400
commit3199b96fc585576ffb2ced6542a2bc2d6172f510 (patch)
tree6f74f43a90022b2a0973688356159f9452f38e7d /lisp/window.el
parent919a69aa0814937507f12851bdd277cb279faf6f (diff)
downloademacs-3199b96fc585576ffb2ced6542a2bc2d6172f510.tar.gz
emacs-3199b96fc585576ffb2ced6542a2bc2d6172f510.tar.bz2
emacs-3199b96fc585576ffb2ced6542a2bc2d6172f510.zip
Fix various uses of display-buffer and pop-to-buffer
to avoid using special-display-* and same-window-* variables. * lisp/buff-menu.el (Buffer-menu-switch-other-window): Use second arg of display-buffer. (Buffer-menu-2-window): Use switch-to-buffer-other-window. * lisp/replace.el (occur-mode-goto-occurrence) (occur-mode-display-occurrence) Use second arg of pop-to-buffer and display-buffer. * lisp/window.el (display-buffer-alist): Add *Python*. * lisp/mail/reporter.el (reporter-submit-bug-report): Use second arg of display-buffer. * lisp/mail/sendmail.el (sendmail-user-agent-compose): Don't bind the special-display and same-window variables. (mail-other-window): Use switch-to-buffer-other-window. (mail-other-frame): USe switch-to-buffer-other-frame. * lisp/progmodes/gdb-mi.el (gdb-frame-gdb-buffer): Use display-buffer-other-frame. (gdb-display-gdb-buffer): Use pop-to-buffer. * lisp/progmodes/gud.el (gud-goto-info): Use info-other-window. * lisp/progmodes/python.el: Don't set same-window-buffer-names. * lisp/textmodes/bibtex.el (bibtex-search-entry): Use switch-to-buffer.
Diffstat (limited to 'lisp/window.el')
-rw-r--r--lisp/window.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/window.el b/lisp/window.el
index 2afd608907d..72cad635ab5 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -4499,8 +4499,9 @@ BUFFER-OR-NAME and return that buffer."
(current-buffer)))
(defvar display-buffer-alist
- '(("\\`\\*\\(scheme\\|ielm\\|shell\\|\\(unsent \\)?mail\\|inferior-lisp\
-\\|Customiz.*\\|info\\|rlogin-.*\\|telnet-.*\\|rsh-.*\\|gud-.*\\)\\*\\(<[0-9]+>\\)?"
+ '(("\\`\\*\\(scheme\\|ielm\\|shell\\|\\(unsent \\)?mail\\|\
+inferior-lisp\\|Python\\|Customiz.*\\|info\\|rlogin-.*\\|\
+telnet-.*\\|rsh-.*\\|gud-.*\\)\\*\\(<[0-9]+>\\)?"
. (display-buffer-same-window)))
"Alist of conditional actions for `display-buffer'.
This is a list of elements (CONDITION . ACTION), where:
@@ -4565,7 +4566,7 @@ the same form as ALIST. See `display-buffer' for details.")
(put 'display-buffer--other-frame-action 'risky-local-variable t)
(defun display-buffer (&optional buffer-or-name action frame)
- "Display BUFFER-OR-NAME in some window.
+ "Display BUFFER-OR-NAME in some window, without selecting it.
BUFFER-OR-NAME must be a buffer or the name of an existing
buffer. Return the window chosen for displaying BUFFER-OR-NAME,
or nil if no such window is found.