* 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.
This commit is contained in:
parent
d3e0023aaa
commit
f72bb4ce36
1 changed files with 4 additions and 3 deletions
|
@ -1526,9 +1526,10 @@ indirectly called by the latter."
|
||||||
Like \\[switch-to-buffer-other-frame] (which see), but creates a new tab."
|
Like \\[switch-to-buffer-other-frame] (which see), but creates a new tab."
|
||||||
(interactive
|
(interactive
|
||||||
(list (read-buffer-to-switch "Switch to buffer in other tab: ")))
|
(list (read-buffer-to-switch "Switch to buffer in other tab: ")))
|
||||||
(display-buffer buffer-or-name '((display-buffer-in-tab
|
(display-buffer (window-normalize-buffer-to-switch-to buffer-or-name)
|
||||||
display-buffer-same-window)
|
'((display-buffer-in-tab
|
||||||
(inhibit-same-window . nil))
|
display-buffer-same-window)
|
||||||
|
(inhibit-same-window . nil))
|
||||||
norecord))
|
norecord))
|
||||||
|
|
||||||
(defun find-file-other-tab (filename &optional wildcards)
|
(defun find-file-other-tab (filename &optional wildcards)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue