diff options
| author | Juri Linkov | 2020-05-31 01:30:34 +0300 |
|---|---|---|
| committer | Juri Linkov | 2020-05-31 01:30:34 +0300 |
| commit | f72bb4ce36686d814bbb540a7844f22570540bc8 (patch) | |
| tree | 2450bc6ce5a250eb75d039ae27a952c47e8282e3 | |
| parent | d3e0023aaa754c3f548b9224f66be537e9758157 (diff) | |
| download | emacs-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.el | 7 |
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." | |||
| 1526 | Like \\[switch-to-buffer-other-frame] (which see), but creates a new tab." | 1526 | Like \\[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) |