From: Martin Rudalics Date: Fri, 15 Jul 2011 07:12:09 +0000 (+0200) Subject: Fix pop-to-buffer call in switch-to-buffer. X-Git-Tag: emacs-pretest-24.0.90~104^2~259 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=75c68aa1b696fca51177e7777e4aa9838a1b4660;p=emacs.git 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1b3e25da8e1..96f4dd07612 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-07-15 Martin Rudalics + + * 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 * 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." (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)