aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2019-09-28 22:55:05 +0300
committerJuri Linkov2019-09-28 22:55:05 +0300
commit457a7edb4784869079eac2a47d2dc1738332c07a (patch)
treefb684b54ae8ea87e116d27cc5fd0a4c29f416503
parentedf48d1d706219ab7cc0a9e267ad200ef82b9a4f (diff)
downloademacs-457a7edb4784869079eac2a47d2dc1738332c07a.tar.gz
emacs-457a7edb4784869079eac2a47d2dc1738332c07a.zip
Update documentation for tabs.
* doc/emacs/frames.texi (Tab Bars): New node.
-rw-r--r--doc/emacs/custom.texi4
-rw-r--r--doc/emacs/display.texi6
-rw-r--r--doc/emacs/emacs.texi1
-rw-r--r--doc/emacs/frames.texi36
-rw-r--r--doc/emacs/glossary.texi9
-rw-r--r--doc/emacs/modes.texi6
-rw-r--r--doc/lispref/commands.texi19
-rw-r--r--doc/lispref/display.texi1
-rw-r--r--doc/lispref/windows.texi12
-rw-r--r--etc/NEWS12
-rw-r--r--lisp/tab-bar.el3
11 files changed, 94 insertions, 15 deletions
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index d3d7d97120a..25509878f9b 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -2150,6 +2150,10 @@ The mouse was in a vertical scroll bar. (This is the only kind of
2150scroll bar Emacs currently supports.) 2150scroll bar Emacs currently supports.)
2151@item menu-bar 2151@item menu-bar
2152The mouse was in the menu bar. 2152The mouse was in the menu bar.
2153@item tab-bar
2154The mouse was in a tab bar.
2155@item tab-line
2156The mouse was in a tab line.
2153@item header-line 2157@item header-line
2154The mouse was in a header line. 2158The mouse was in a header line.
2155@ignore 2159@ignore
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index 6fc99bd2716..84363d0f0d2 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -722,6 +722,10 @@ Similar to @code{highlight} and @code{mode-line-highlight}, but used
722for mouse-sensitive portions of text on header lines. This is a 722for mouse-sensitive portions of text on header lines. This is a
723separate face because the @code{header-line} face might be customized 723separate face because the @code{header-line} face might be customized
724in a way that does not interact well with @code{highlight}. 724in a way that does not interact well with @code{highlight}.
725@item tab-line
726@cindex @code{tab-line} face
727Similar to @code{mode-line} for a window's tab line, which appears
728at the top of a window with tabs representing window buffers.
725@item vertical-border 729@item vertical-border
726@cindex @code{vertical-border} face 730@cindex @code{vertical-border} face
727This face is used for the vertical divider between windows on text 731This face is used for the vertical divider between windows on text
@@ -763,6 +767,8 @@ This face determines the visual appearance of the scroll bar.
763@xref{Scroll Bars}. 767@xref{Scroll Bars}.
764@item tool-bar 768@item tool-bar
765This face determines the color of tool bar icons. @xref{Tool Bars}. 769This face determines the color of tool bar icons. @xref{Tool Bars}.
770@item tab-bar
771This face determines the color of tab bar icons. @xref{Tab Bars}.
766@item menu 772@item menu
767@cindex menu bar appearance 773@cindex menu bar appearance
768@cindex @code{menu} face, no effect if customized 774@cindex @code{menu} face, no effect if customized
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index ad4be90aaf3..aef0e9b37e3 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -540,6 +540,7 @@ Frames and Graphical Displays
540* Drag and Drop:: Using drag and drop to open files and insert text. 540* Drag and Drop:: Using drag and drop to open files and insert text.
541* Menu Bars:: Enabling and disabling the menu bar. 541* Menu Bars:: Enabling and disabling the menu bar.
542* Tool Bars:: Enabling and disabling the tool bar. 542* Tool Bars:: Enabling and disabling the tool bar.
543* Tab Bars:: Enabling and disabling the tab bar.
543* Dialog Boxes:: Controlling use of dialog boxes. 544* Dialog Boxes:: Controlling use of dialog boxes.
544* Tooltips:: Displaying information at the current mouse position. 545* Tooltips:: Displaying information at the current mouse position.
545* Mouse Avoidance:: Preventing the mouse pointer from obscuring text. 546* Mouse Avoidance:: Preventing the mouse pointer from obscuring text.
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index 367ac43a0a4..0003881fad1 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -58,6 +58,7 @@ for doing so on MS-DOS). Menus are supported on all text terminals.
58* Drag and Drop:: Using drag and drop to open files and insert text. 58* Drag and Drop:: Using drag and drop to open files and insert text.
59* Menu Bars:: Enabling and disabling the menu bar. 59* Menu Bars:: Enabling and disabling the menu bar.
60* Tool Bars:: Enabling and disabling the tool bar. 60* Tool Bars:: Enabling and disabling the tool bar.
61* Tab Bars:: Enabling and disabling the tab bar.
61* Dialog Boxes:: Controlling use of dialog boxes. 62* Dialog Boxes:: Controlling use of dialog boxes.
62* Tooltips:: Displaying information at the current mouse position. 63* Tooltips:: Displaying information at the current mouse position.
63* Mouse Avoidance:: Preventing the mouse pointer from obscuring text. 64* Mouse Avoidance:: Preventing the mouse pointer from obscuring text.
@@ -1214,6 +1215,41 @@ Parameters,,, elisp, The Emacs Lisp Reference Manual}. On macOS the
1214tool bar is hidden when the frame is put into fullscreen, but can be 1215tool bar is hidden when the frame is put into fullscreen, but can be
1215displayed by moving the mouse pointer to the top of the screen. 1216displayed by moving the mouse pointer to the top of the screen.
1216 1217
1218@node Tab Bars
1219@section Tab Bars
1220@cindex Tab Bar mode
1221@cindex mode, Tab Bar
1222@cindex tabs, tabbar
1223
1224 On graphical displays and on text terminals, Emacs puts a @dfn{tab bar}
1225at the top of each frame, just below the menu bar. This is a row of
1226tabs which you can click on with the mouse to switch window configurations.
1227
1228 Each tab on the tab bar represents a named persistent window
1229configuration. Its name is composed from the names of buffers
1230visible in windows of the window configuration. Clicking on the
1231tab name switches the current window configuration to the previously
1232used configuration of windows and buffers.
1233
1234 If you are using the desktop library to save and restore your
1235sessions, the tabs from the tab bar are recorded in the desktop file,
1236together with their associated window configurations.
1237
1238@findex tab-bar-mode
1239@vindex tab-bar-mode
1240 To toggle the use of tab bars, type @kbd{M-x tab-bar-mode}. This
1241command applies to all frames, including frames yet to be created. To
1242control the use of tab bars at startup, customize the variable
1243@code{tab-bar-mode}.
1244
1245@vindex tab-bar-new-tab-choice
1246@cindex Tab Bar new tab
1247 By default, Emacs follows the same behavior as when creating frames,
1248to start a new tab with the current buffer, i.e. the buffer
1249that was current before calling the command that adds a new tab.
1250To start a new tab with other buffers, customize the variable
1251@code{tab-bar-new-tab-choice}.
1252
1217@node Dialog Boxes 1253@node Dialog Boxes
1218@section Using Dialog Boxes 1254@section Using Dialog Boxes
1219@cindex dialog boxes 1255@cindex dialog boxes
diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi
index ad16d72ddbf..30ddffab696 100644
--- a/doc/emacs/glossary.texi
+++ b/doc/emacs/glossary.texi
@@ -1360,6 +1360,15 @@ your buffers, unsaved edits, undo history, etc. @xref{Exiting}.
1360@key{TAB} is the tab character. In Emacs it is typically used for 1360@key{TAB} is the tab character. In Emacs it is typically used for
1361indentation or completion. 1361indentation or completion.
1362 1362
1363@item Tab Bar
1364The tab bar is a row of tabs at the top of an Emacs frame.
1365Clicking on one of these tabs switches named persistent window
1366configurations. @xref{Tab Bars}.
1367
1368@item Tab Line
1369The tab line is a line of tabs at the top of an Emacs window.
1370Clicking on one of these tabs switches window buffers.
1371
1363@anchor{Glossary---Tags Table} 1372@anchor{Glossary---Tags Table}
1364@item Tags Table 1373@item Tags Table
1365A tags table is a file that serves as an index to the function 1374A tags table is a file that serves as an index to the function
diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi
index e01dfa2677b..64034d71860 100644
--- a/doc/emacs/modes.texi
+++ b/doc/emacs/modes.texi
@@ -296,6 +296,12 @@ but the tool bar is only displayed on graphical terminals. @xref{Tool
296Bars}. 296Bars}.
297 297
298@item 298@item
299Tab Bar mode gives each frame a tab bar. @xref{Tab Bars}.
300
301@item
302Tab Line mode gives each window a tab line.
303
304@item
299Transient Mark mode highlights the region, and makes many Emacs 305Transient Mark mode highlights the region, and makes many Emacs
300commands operate on the region when the mark is active. It is enabled 306commands operate on the region when the mark is active. It is enabled
301by default. @xref{Mark}. 307by default. @xref{Mark}.
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index 1fd56d02841..541a97f8add 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -1348,7 +1348,7 @@ button. @xref{Repeat Events}.
1348@var{position} slot of a click event, you should typically use the 1348@var{position} slot of a click event, you should typically use the
1349functions documented in @ref{Accessing Mouse}. The explicit format of 1349functions documented in @ref{Accessing Mouse}. The explicit format of
1350the list depends on where the click occurred. For clicks in the text 1350the list depends on where the click occurred. For clicks in the text
1351area, mode line, header line, or in the fringe or marginal areas, the 1351area, mode line, header line, tab line, or in the fringe or marginal areas, the
1352mouse position list has the form 1352mouse position list has the form
1353 1353
1354@example 1354@example
@@ -1368,7 +1368,7 @@ The window in which the click occurred.
1368The buffer position of the character clicked on in the text area; or, 1368The buffer position of the character clicked on in the text area; or,
1369if the click was outside the text area, the window area where it 1369if the click was outside the text area, the window area where it
1370occurred. It is one of the symbols @code{mode-line}, 1370occurred. It is one of the symbols @code{mode-line},
1371@code{header-line}, @code{vertical-line}, @code{left-margin}, 1371@code{header-line}, @code{tab-line}, @code{vertical-line}, @code{left-margin},
1372@code{right-margin}, @code{left-fringe}, or @code{right-fringe}. 1372@code{right-margin}, @code{left-fringe}, or @code{right-fringe}.
1373 1373
1374In one special case, @var{pos-or-area} is a list containing a symbol 1374In one special case, @var{pos-or-area} is a list containing a symbol
@@ -1380,7 +1380,7 @@ by Emacs. @xref{Key Sequence Input}.
1380The relative pixel coordinates of the click. For clicks in the text 1380The relative pixel coordinates of the click. For clicks in the text
1381area of a window, the coordinate origin @code{(0 . 0)} is taken to be 1381area of a window, the coordinate origin @code{(0 . 0)} is taken to be
1382the top left corner of the text area. @xref{Window Sizes}. For 1382the top left corner of the text area. @xref{Window Sizes}. For
1383clicks in a mode line or header line, the coordinate origin is the top 1383clicks in a mode line, header line or tab line, the coordinate origin is the top
1384left corner of the window itself. For fringes, margins, and the 1384left corner of the window itself. For fringes, margins, and the
1385vertical border, @var{x} does not have meaningful data. For fringes 1385vertical border, @var{x} does not have meaningful data. For fringes
1386and margins, @var{y} is relative to the bottom edge of the header 1386and margins, @var{y} is relative to the bottom edge of the header
@@ -1407,7 +1407,7 @@ The position in the string where the click occurred.
1407@item @var{text-pos} 1407@item @var{text-pos}
1408For clicks on a marginal area or on a fringe, this is the buffer 1408For clicks on a marginal area or on a fringe, this is the buffer
1409position of the first visible character in the corresponding line in 1409position of the first visible character in the corresponding line in
1410the window. For clicks on the mode line or the header line, this is 1410the window. For clicks on the mode line, the header line or the tab line, this is
1411@code{nil}. For other events, it is the buffer position closest to 1411@code{nil}. For other events, it is the buffer position closest to
1412the click. 1412the click.
1413 1413
@@ -1416,7 +1416,8 @@ These are the actual column and row coordinate numbers of the glyph
1416under the @var{x}, @var{y} position. If @var{x} lies beyond the last 1416under the @var{x}, @var{y} position. If @var{x} lies beyond the last
1417column of actual text on its line, @var{col} is reported by adding 1417column of actual text on its line, @var{col} is reported by adding
1418fictional extra columns that have the default character width. Row 0 1418fictional extra columns that have the default character width. Row 0
1419is taken to be the header line if the window has one, or the topmost 1419is taken to be the header line if the window has one, or Row 1
1420if the window also has the tab line, or the topmost
1420row of the text area otherwise. Column 0 is taken to be the leftmost 1421row of the text area otherwise. Column 0 is taken to be the leftmost
1421column of the text area for clicks on a window text area, or the 1422column of the text area for clicks on a window text area, or the
1422leftmost mode line or header line column for clicks there. For clicks 1423leftmost mode line or header line column for clicks there. For clicks
@@ -2094,7 +2095,7 @@ computed values.)
2094 2095
2095Note that @var{row} is counted from the top of the text area. If the 2096Note that @var{row} is counted from the top of the text area. If the
2096window given by @var{position} possesses a header line (@pxref{Header 2097window given by @var{position} possesses a header line (@pxref{Header
2097Lines}), it is @emph{not} included in the @var{row} count. 2098Lines}) or a tab line, they are @emph{not} included in the @var{row} count.
2098@end defun 2099@end defun
2099 2100
2100@defun posn-actual-col-row position 2101@defun posn-actual-col-row position
@@ -2452,12 +2453,14 @@ button-down events entirely. It also reshuffles focus events and
2452miscellaneous window events so that they never appear in a key sequence 2453miscellaneous window events so that they never appear in a key sequence
2453with any other events. 2454with any other events.
2454 2455
2456@cindex @code{tab-line} prefix key
2455@cindex @code{header-line} prefix key 2457@cindex @code{header-line} prefix key
2456@cindex @code{mode-line} prefix key 2458@cindex @code{mode-line} prefix key
2457@cindex @code{vertical-line} prefix key 2459@cindex @code{vertical-line} prefix key
2458@cindex @code{horizontal-scroll-bar} prefix key 2460@cindex @code{horizontal-scroll-bar} prefix key
2459@cindex @code{vertical-scroll-bar} prefix key 2461@cindex @code{vertical-scroll-bar} prefix key
2460@cindex @code{menu-bar} prefix key 2462@cindex @code{menu-bar} prefix key
2463@cindex @code{tab-bar} prefix key
2461@cindex mouse events, in special parts of frame 2464@cindex mouse events, in special parts of frame
2462When mouse events occur in special parts of a window, such as a mode 2465When mouse events occur in special parts of a window, such as a mode
2463line or a scroll bar, the event type shows nothing special---it is the 2466line or a scroll bar, the event type shows nothing special---it is the
@@ -2465,8 +2468,8 @@ same symbol that would normally represent that combination of mouse
2465button and modifier keys. The information about the window part is kept 2468button and modifier keys. The information about the window part is kept
2466elsewhere in the event---in the coordinates. But 2469elsewhere in the event---in the coordinates. But
2467@code{read-key-sequence} translates this information into imaginary 2470@code{read-key-sequence} translates this information into imaginary
2468prefix keys, all of which are symbols: @code{header-line}, 2471prefix keys, all of which are symbols: @code{tab-line}, @code{header-line},
2469@code{horizontal-scroll-bar}, @code{menu-bar}, @code{mode-line}, 2472@code{horizontal-scroll-bar}, @code{menu-bar}, @code{tab-bar}, @code{mode-line},
2470@code{vertical-line}, and @code{vertical-scroll-bar}. You can define 2473@code{vertical-line}, and @code{vertical-scroll-bar}. You can define
2471meanings for mouse clicks in special window parts by defining key 2474meanings for mouse clicks in special window parts by defining key
2472sequences using these imaginary prefix keys. 2475sequences using these imaginary prefix keys.
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 7c0a56dcad3..3b2049a2876 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -2944,6 +2944,7 @@ If the text lies within the mode line of the selected window, Emacs
2944applies the @code{mode-line} face. For the mode line of a 2944applies the @code{mode-line} face. For the mode line of a
2945non-selected window, Emacs applies the @code{mode-line-inactive} face. 2945non-selected window, Emacs applies the @code{mode-line-inactive} face.
2946For a header line, Emacs applies the @code{header-line} face. 2946For a header line, Emacs applies the @code{header-line} face.
2947For a tab line, Emacs applies the @code{tab-line} face.
2947 2948
2948@item 2949@item
2949If the text comes from an overlay string via @code{before-string} or 2950If the text comes from an overlay string via @code{before-string} or
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 39d3960c9a2..f05a6db1761 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -5558,6 +5558,9 @@ The coordinates are in the mode line of @var{window}.
5558@item header-line 5558@item header-line
5559The coordinates are in the header line of @var{window}. 5559The coordinates are in the header line of @var{window}.
5560 5560
5561@item tab-line
5562The coordinates are in the tab line of @var{window}.
5563
5561@item right-divider 5564@item right-divider
5562The coordinates are in the divider separating @var{window} from a 5565The coordinates are in the divider separating @var{window} from a
5563window on the right. 5566window on the right.
@@ -6115,6 +6118,15 @@ to suppress display of a header line for this window. Display and
6115contents of the header line on other windows showing this buffer are not 6118contents of the header line on other windows showing this buffer are not
6116affected. 6119affected.
6117 6120
6121@item tab-line-format
6122@vindex tab-line-format@r{, a window parameter}
6123This parameter replaces the value of the buffer-local variable
6124@code{tab-line-format} (@pxref{Mode Line Basics}) of this window's
6125buffer whenever this window is displayed. The symbol @code{none} means
6126to suppress display of a tab line for this window. Display and
6127contents of the tab line on other windows showing this buffer are not
6128affected.
6129
6118@item min-margins 6130@item min-margins
6119@vindex min-margins@r{, a window parameter} 6131@vindex min-margins@r{, a window parameter}
6120The value of this parameter is a cons cell whose @sc{car} and 6132The value of this parameter is a cons cell whose @sc{car} and
diff --git a/etc/NEWS b/etc/NEWS
index 37382e843bd..f824eccaefc 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1896,12 +1896,12 @@ New tab-based keybindings (similar to frame-based):
1896Also it's possible to switch named persistent window configurations 1896Also it's possible to switch named persistent window configurations
1897without having graphical access to the tab-bar, even on a tty 1897without having graphical access to the tab-bar, even on a tty
1898or when 'tab-bar-mode' is disabled, with these commands: 1898or when 'tab-bar-mode' is disabled, with these commands:
1899'list-tabs' displays a list of named window configurations for switching; 1899'tab-new' creates a new window configuration;
1900'make-tab' creates a new window configuration; 1900'tab-delete' deletes the current window configuration;
1901'delete-tab' deletes the current window configuration; 1901'tab-select' switches to the window configuration by its name;
1902'switch-to-tab' switches to the window configuration by its name; 1902'tab-previous' switches to the previous window configuration;
1903'previous-tab' switches to the previous window configuration; 1903'tab-next' switches to the next window configuration;
1904'next-tab' switches to the next window configuration. 1904'tab-list' displays a list of named window configurations for switching.
1905 1905
1906** 'global-tab-line-mode' enables the tab-line above each window to 1906** 'global-tab-line-mode' enables the tab-line above each window to
1907switch buffers in it to previous/next buffers. Selecting a previous 1907switch buffers in it to previous/next buffers. Selecting a previous
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index fb13ff4178b..3108c595e94 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -481,7 +481,7 @@ specified by `tab-bar-close-tab-select'."
481 481
482;;; Non-graphical access to frame-local tabs (named window configurations) 482;;; Non-graphical access to frame-local tabs (named window configurations)
483 483
484(defun tab-make () 484(defun tab-new ()
485 "Create a new named window configuration without having to click a tab." 485 "Create a new named window configuration without having to click a tab."
486 (interactive) 486 (interactive)
487 (tab-bar-new-tab) 487 (tab-bar-new-tab)
@@ -500,6 +500,7 @@ specified by `tab-bar-close-tab-select'."
500(defalias 'tab-select 'tab-bar-select-tab) 500(defalias 'tab-select 'tab-bar-select-tab)
501(defalias 'tab-previous 'tab-bar-switch-to-prev-tab) 501(defalias 'tab-previous 'tab-bar-switch-to-prev-tab)
502(defalias 'tab-next 'tab-bar-switch-to-next-tab) 502(defalias 'tab-next 'tab-bar-switch-to-next-tab)
503(defalias 'tab-list 'tab-bar-list)
503 504
504(defun tab-bar-list () 505(defun tab-bar-list ()
505 "Display a list of named window configurations. 506 "Display a list of named window configurations.