aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2020-05-31 01:30:34 +0300
committerJuri Linkov2020-05-31 01:30:34 +0300
commitf72bb4ce36686d814bbb540a7844f22570540bc8 (patch)
tree2450bc6ce5a250eb75d039ae27a952c47e8282e3
parentd3e0023aaa754c3f548b9224f66be537e9758157 (diff)
downloademacs-f72bb4ce36686d814bbb540a7844f22570540bc8.tar.gz
emacs-f72bb4ce36686d814bbb540a7844f22570540bc8.zip
* lisp/tab-bar.el (switch-to-buffer-other-tab): Normalize buffer.
* lisp/tab-bar.el (switch-to-buffer-other-tab): Use 'window-normalize-buffer-to-switch-to' on 'buffer-or-name', like does 'pop-to-buffer' used by 'switch-to-buffer-other-frame', instead of raising the error "Invalid buffer" on a non-existent buffer name.
-rw-r--r--lisp/tab-bar.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 69863e55ce3..5c237e7130e 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -1526,9 +1526,10 @@ indirectly called by the latter."
1526Like \\[switch-to-buffer-other-frame] (which see), but creates a new tab." 1526Like \\[switch-to-buffer-other-frame] (which see), but creates a new tab."
1527 (interactive 1527 (interactive
1528 (list (read-buffer-to-switch "Switch to buffer in other tab: "))) 1528 (list (read-buffer-to-switch "Switch to buffer in other tab: ")))
1529 (display-buffer buffer-or-name '((display-buffer-in-tab 1529 (display-buffer (window-normalize-buffer-to-switch-to buffer-or-name)
1530 display-buffer-same-window) 1530 '((display-buffer-in-tab
1531 (inhibit-same-window . nil)) 1531 display-buffer-same-window)
1532 (inhibit-same-window . nil))
1532 norecord)) 1533 norecord))
1533 1534
1534(defun find-file-other-tab (filename &optional wildcards) 1535(defun find-file-other-tab (filename &optional wildcards)