by typing the related commands: @kbd{M-x tab-new}, @kbd{M-x tab-next},
@kbd{M-x tab-list}, @kbd{M-x tab-close}, etc.
+@kindex C-x 6
+ The prefix key @kbd{C-x 6} is analogous to @kbd{C-x 5}.
+Whereas each @kbd{C-x 5} command pops up a buffer in a different frame
+(@pxref{Creating Frames}), the @kbd{C-x 6} commands use a different
+tab with a different window configuration in the selected frame.
+
+ The various @kbd{C-x 6} commands differ in how they find or create the
+buffer to select:
+
+@table @kbd
+@item C-x 6 2
+@kindex C-x 6 2
+@findex tab-new
+Add a new tab (@code{tab-new}). You can control the choice of the
+buffer displayed in a new tab by customizing the variable
+@code{tab-bar-new-tab-choice}.
+@item C-x 6 b @var{bufname} @key{RET}
+Select buffer @var{bufname} in another tab. This runs
+@code{switch-to-buffer-other-tab}.
+@item C-x 6 f @var{filename} @key{RET}
+Visit file @var{filename} and select its buffer in another tab. This
+runs @code{find-file-other-tab}. @xref{Visiting}.
+@item C-x 6 d @var{directory} @key{RET}
+Select a Dired buffer for directory @var{directory} in another tab.
+This runs @code{dired-other-tab}. @xref{Dired}.
+@end table
+
@vindex tab-bar-new-tab-choice
By default, a new tab starts with the current buffer that was
current before calling the command that adds a new tab. To start a
new tab with other buffers, customize the variable
@code{tab-bar-new-tab-choice}.
+ The following commands are used to delete and operate on tabs:
+
+@table @kbd
+@item C-x 6 0
+@kindex C-x 6 0
+@findex tab-close
+Close the selected tab (@code{tab-close}). It has no effect if there
+is only one tab.
+
+@item C-x 6 o
+@kindex C-x 6 o
+@kindex C-TAB
+@findex tab-next
+Switch to another tab. If you repeat this command, it cycles through
+all the tabs on the selected frame. With a positive numeric argument
+N, it switches to the next Nth tab; with a negative argument −N, it
+switches back to the previous Nth tab.
+@end table
+
@node Dialog Boxes
@section Using Dialog Boxes
@cindex dialog boxes
Tab-related commands are available even when the Tab-Bar mode is
disabled: by default, they enable Tab-Bar mode in that case.
+Read the new Info node "(emacs) Tab Bars" for full description
+of all related features.
+
*** Tab-Line mode
The new command 'global-tab-line-mode' enables the tab-line above each
window, which you can use to switch buffers in the window. Selecting
(interactive (dired-read-dir-and-switches "in other frame "))
(switch-to-buffer-other-frame (dired-noselect dirname switches)))
+;;;###autoload (define-key ctl-x-6-map "d" 'dired-other-tab)
+;;;###autoload
+(defun dired-other-tab (dirname &optional switches)
+ "\"Edit\" directory DIRNAME. Like `dired' but makes a new tab."
+ (interactive (dired-read-dir-and-switches "in other tab "))
+ (switch-to-buffer-other-tab (dired-noselect dirname switches)))
+
;;;###autoload
(defun dired-noselect (dir-or-list &optional switches)
"Like `dired' but returns the Dired buffer as value, does not select it."
(defalias 'ctl-x-5-prefix ctl-x-5-map)
(define-key ctl-x-map "5" 'ctl-x-5-prefix)
+(defvar ctl-x-6-map (make-sparse-keymap)
+ "Keymap for tab commands.")
+(defalias 'ctl-x-6-prefix ctl-x-6-map)
+(define-key ctl-x-map "6" 'ctl-x-6-prefix)
+
\f
;;;; Event manipulation functions.
(tab-bar-list-select))
\f
-(defvar ctl-x-6-map (make-sparse-keymap)
- "Keymap for tab commands.")
-(defalias 'ctl-x-6-prefix ctl-x-6-map)
-(define-key ctl-x-map "6" 'ctl-x-6-prefix)
-
(defun switch-to-buffer-other-tab (buffer-or-name &optional norecord)
"Switch to buffer BUFFER-OR-NAME in another tab.
Like \\[switch-to-buffer-other-frame] (which see), but creates a new tab."
(define-key ctl-x-6-map "2" 'tab-new)
(define-key ctl-x-6-map "0" 'tab-close)
+(define-key ctl-x-6-map "o" 'tab-next)
(define-key ctl-x-6-map "b" 'switch-to-buffer-other-tab)
(define-key ctl-x-6-map "f" 'find-file-other-tab)
(define-key ctl-x-6-map "\C-f" 'find-file-other-tab)