]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/tab-bar.el (switch-to-buffer-other-tab): Use pop-to-buffer (bug#55582).
authorJuri Linkov <juri@linkov.net>
Mon, 23 May 2022 07:48:15 +0000 (10:48 +0300)
committerJuri Linkov <juri@linkov.net>
Mon, 23 May 2022 07:48:15 +0000 (10:48 +0300)
Replace display-buffer with pop-to-buffer that sets the current buffer
explicitly.

lisp/tab-bar.el

index 42c4b822bc63279a1accc4b488b439db4d6c6c84..ddab71c52c439cef7d609aecae7e5b894db48bce 100644 (file)
@@ -2320,9 +2320,9 @@ Interactively, prompt for the buffer to switch to."
   (declare (advertised-calling-convention (buffer-or-name) "28.1"))
   (interactive
    (list (read-buffer-to-switch "Switch to buffer in other tab: ")))
-  (display-buffer (window-normalize-buffer-to-switch-to buffer-or-name)
-                  '((display-buffer-in-tab)
-                    (inhibit-same-window . nil))))
+  (pop-to-buffer (window-normalize-buffer-to-switch-to buffer-or-name)
+                 '((display-buffer-in-tab)
+                   (inhibit-same-window . nil))))
 
 (defun find-file-other-tab (filename &optional wildcards)
   "Edit file FILENAME, in another tab.