+2011-07-15 Martin Rudalics <rudalics@gmx.at>
+
+ * window.el (switch-to-buffer): Call pop-to-buffer with normalized
+ buffer argument (Bug#9083) and self-identifying label argument.
+
2011-07-15 Glenn Morris <rgm@gnu.org>
* emacs-lisp/debug.el (debug): Doc fix. (Bug#8273)
(list (read-buffer-to-switch "Switch to buffer: ") nil nil))
(let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name)))
(if (null force-same-window)
- (pop-to-buffer buffer-or-name
- '(same-window (reuse-window-dedicated . weak))
- norecord nil)
+ (pop-to-buffer
+ buffer '(same-window (reuse-window-dedicated . weak))
+ norecord 'switch-to-buffer)
(cond
;; Don't call set-window-buffer if it's not needed since it
;; might signal an error (e.g. if the window is dedicated).
- ((eq buffer (window-buffer)) nil)
+ ((eq buffer (window-buffer)))
((window-minibuffer-p)
(error "Cannot switch buffers in minibuffer window"))
((eq (window-dedicated-p) t)