aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Rudalics2011-07-15 09:12:09 +0200
committerMartin Rudalics2011-07-15 09:12:09 +0200
commit75c68aa1b696fca51177e7777e4aa9838a1b4660 (patch)
tree4c77b90799540cfb0de6272d3acbeaf86109e07d
parentec2bc542a4d0127425625e8cb458684bd825675a (diff)
downloademacs-75c68aa1b696fca51177e7777e4aa9838a1b4660.tar.gz
emacs-75c68aa1b696fca51177e7777e4aa9838a1b4660.zip
Fix pop-to-buffer call in switch-to-buffer.
* window.el (switch-to-buffer): Call pop-to-buffer with normalized buffer argument (Bug#9083) and self-identifying label argument.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/window.el8
2 files changed, 9 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1b3e25da8e1..96f4dd07612 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12011-07-15 Martin Rudalics <rudalics@gmx.at>
2
3 * window.el (switch-to-buffer): Call pop-to-buffer with normalized
4 buffer argument (Bug#9083) and self-identifying label argument.
5
12011-07-15 Glenn Morris <rgm@gnu.org> 62011-07-15 Glenn Morris <rgm@gnu.org>
2 7
3 * emacs-lisp/debug.el (debug): Doc fix. (Bug#8273) 8 * emacs-lisp/debug.el (debug): Doc fix. (Bug#8273)
diff --git a/lisp/window.el b/lisp/window.el
index 0302a672521..4f21bb05397 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -5953,13 +5953,13 @@ Return the buffer switched to."
5953 (list (read-buffer-to-switch "Switch to buffer: ") nil nil)) 5953 (list (read-buffer-to-switch "Switch to buffer: ") nil nil))
5954 (let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name))) 5954 (let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name)))
5955 (if (null force-same-window) 5955 (if (null force-same-window)
5956 (pop-to-buffer buffer-or-name 5956 (pop-to-buffer
5957 '(same-window (reuse-window-dedicated . weak)) 5957 buffer '(same-window (reuse-window-dedicated . weak))
5958 norecord nil) 5958 norecord 'switch-to-buffer)
5959 (cond 5959 (cond
5960 ;; Don't call set-window-buffer if it's not needed since it 5960 ;; Don't call set-window-buffer if it's not needed since it
5961 ;; might signal an error (e.g. if the window is dedicated). 5961 ;; might signal an error (e.g. if the window is dedicated).
5962 ((eq buffer (window-buffer)) nil) 5962 ((eq buffer (window-buffer)))
5963 ((window-minibuffer-p) 5963 ((window-minibuffer-p)
5964 (error "Cannot switch buffers in minibuffer window")) 5964 (error "Cannot switch buffers in minibuffer window"))
5965 ((eq (window-dedicated-p) t) 5965 ((eq (window-dedicated-p) t)