From: Juri Linkov Date: Mon, 23 May 2022 07:48:15 +0000 (+0300) Subject: * lisp/tab-bar.el (switch-to-buffer-other-tab): Use pop-to-buffer (bug#55582). X-Git-Tag: emacs-29.0.90~1910^2~490 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4766fe1daf9f1b3f711d3fe453840487601cce81;p=emacs.git * lisp/tab-bar.el (switch-to-buffer-other-tab): Use pop-to-buffer (bug#55582). Replace display-buffer with pop-to-buffer that sets the current buffer explicitly. --- diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index 42c4b822bc6..ddab71c52c4 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -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.