diff options
| author | Jared Finder | 2024-06-08 17:23:58 -0700 |
|---|---|---|
| committer | Eli Zaretskii | 2024-06-09 15:21:34 +0300 |
| commit | a5c0d682b10fa60925641c6abc3a5dbee024fa46 (patch) | |
| tree | d8ad62800a6d19bc37b5dc03f3ca87d4df930d3b /doc/lispref | |
| parent | 7f8ded2a85d551c6e3303eaca1697bbd7b9427ef (diff) | |
| download | emacs-a5c0d682b10fa60925641c6abc3a5dbee024fa46.tar.gz emacs-a5c0d682b10fa60925641c6abc3a5dbee024fa46.zip | |
Add documentation for window-tool-bar package
Also change window-tool-mode to not pay attention to if
tool-bar-map has a buffer local value or not as that made the
documentation complicated. Documentation added in Emacs manual,
Elisp manual, package commentary, and docstrings. Also extend
window-tool-bar support to Emacs 27 and newer. (bug#68765)
* doc/emacs/emacs.texi (Top):
* doc/emacs/frames.texi (Menu Bars):
* doc/emacs/glossary.texi (Glossary):
* doc/emacs/modes.texi (Minor Modes):
* doc/emacs/windows.texi (Windows, Tab Line): Mention Window
Tool Bar.
(Window Tool Bar): New documentation.
* doc/lispref/elisp.texi (Top):
* doc/lispref/modes.texi (Mode Line Format, Mode Line Basics)
(Mode Line Data): Mention Tab Lines.
(Tab Lines): New documentation.
* etc/NEWS: Mention newly added variable and package.
* lisp/window-tool-bar.el (window-tool-bar-mode): Don't display
tool bar when tool-bar-map is nil.
* lisp/window-tool-bar.el (tool-bar-always-show-default): Define
variable for older Emacs versions.
Diffstat (limited to 'doc/lispref')
| -rw-r--r-- | doc/lispref/elisp.texi | 1 | ||||
| -rw-r--r-- | doc/lispref/modes.texi | 56 |
2 files changed, 43 insertions, 14 deletions
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index 339272d1f05..1059d0dcf61 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi | |||
| @@ -925,6 +925,7 @@ Mode Line Format | |||
| 925 | * %-Constructs:: Putting information into a mode line. | 925 | * %-Constructs:: Putting information into a mode line. |
| 926 | * Properties in Mode:: Using text properties in the mode line. | 926 | * Properties in Mode:: Using text properties in the mode line. |
| 927 | * Header Lines:: Like a mode line, but at the top. | 927 | * Header Lines:: Like a mode line, but at the top. |
| 928 | * Tab Lines:: A line that is above the header line. | ||
| 928 | * Emulating Mode Line:: Formatting text as the mode line would. | 929 | * Emulating Mode Line:: Formatting text as the mode line would. |
| 929 | 930 | ||
| 930 | Font Lock Mode | 931 | Font Lock Mode |
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index cf67b319924..f3d4f5347b3 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi | |||
| @@ -2074,14 +2074,14 @@ their previous values/states (using the companion function | |||
| 2074 | line at the bottom, which displays status information about the buffer | 2074 | line at the bottom, which displays status information about the buffer |
| 2075 | displayed in the window. The mode line contains information about the | 2075 | displayed in the window. The mode line contains information about the |
| 2076 | buffer, such as its name, associated file, depth of recursive editing, | 2076 | buffer, such as its name, associated file, depth of recursive editing, |
| 2077 | and major and minor modes. A window can also have a @dfn{header | 2077 | and major and minor modes. A window can also have a @dfn{header line} |
| 2078 | line}, which is much like the mode line but appears at the top of the | 2078 | and a @dfn{tab line}, which are much like the mode line but they appear |
| 2079 | window. | 2079 | at the top of the window. |
| 2080 | 2080 | ||
| 2081 | This section describes how to control the contents of the mode line | 2081 | This section describes how to control the contents of the mode line, |
| 2082 | and header line. We include it in this chapter because much of the | 2082 | header line, and tab line. We include it in this chapter because much |
| 2083 | information displayed in the mode line relates to the enabled major and | 2083 | of the information displayed in the mode line relates to the enabled |
| 2084 | minor modes. | 2084 | major and minor modes. |
| 2085 | 2085 | ||
| 2086 | @menu | 2086 | @menu |
| 2087 | * Base: Mode Line Basics. Basic ideas of mode line control. | 2087 | * Base: Mode Line Basics. Basic ideas of mode line control. |
| @@ -2091,6 +2091,7 @@ minor modes. | |||
| 2091 | * %-Constructs:: Putting information into a mode line. | 2091 | * %-Constructs:: Putting information into a mode line. |
| 2092 | * Properties in Mode:: Using text properties in the mode line. | 2092 | * Properties in Mode:: Using text properties in the mode line. |
| 2093 | * Header Lines:: Like a mode line, but at the top. | 2093 | * Header Lines:: Like a mode line, but at the top. |
| 2094 | * Tab Lines:: A line that is above the header line. | ||
| 2094 | * Emulating Mode Line:: Formatting text as the mode line would. | 2095 | * Emulating Mode Line:: Formatting text as the mode line would. |
| 2095 | @end menu | 2096 | @end menu |
| 2096 | 2097 | ||
| @@ -2101,11 +2102,13 @@ minor modes. | |||
| 2101 | variable @code{mode-line-format} (@pxref{Mode Line Top}). This variable | 2102 | variable @code{mode-line-format} (@pxref{Mode Line Top}). This variable |
| 2102 | holds a @dfn{mode line construct}: a template that controls what is | 2103 | holds a @dfn{mode line construct}: a template that controls what is |
| 2103 | displayed on the buffer's mode line. The value of | 2104 | displayed on the buffer's mode line. The value of |
| 2104 | @code{header-line-format} specifies the buffer's header line in the same | 2105 | @code{header-line-format} and @code{tab-line-format} specifies the |
| 2105 | way. All windows for the same buffer use the same | 2106 | buffer's header line and tab line in the same way. All windows for the |
| 2106 | @code{mode-line-format} and @code{header-line-format} unless a | 2107 | same buffer use the same @code{mode-line-format}, |
| 2107 | @code{mode-line-format} or @code{header-line-format} parameter has been | 2108 | @code{header-line-format}, and @code{tab-line-format} unless a |
| 2108 | specified for that window (@pxref{Window Parameters}). | 2109 | @code{mode-line-format}, @code{header-line-format}, or |
| 2110 | @code{tab-line-format} parameter has been specified for that window | ||
| 2111 | (@pxref{Window Parameters}). | ||
| 2109 | 2112 | ||
| 2110 | For efficiency, Emacs does not continuously recompute each window's | 2113 | For efficiency, Emacs does not continuously recompute each window's |
| 2111 | mode line and header line. It does so when circumstances appear to call | 2114 | mode line and header line. It does so when circumstances appear to call |
| @@ -2167,8 +2170,8 @@ buffers. | |||
| 2167 | @dfn{mode line construct}, made up of lists, strings, symbols, and | 2170 | @dfn{mode line construct}, made up of lists, strings, symbols, and |
| 2168 | numbers kept in buffer-local variables. Each data type has a specific | 2171 | numbers kept in buffer-local variables. Each data type has a specific |
| 2169 | meaning for the mode line appearance, as described below. The same data | 2172 | meaning for the mode line appearance, as described below. The same data |
| 2170 | structure is used for constructing frame titles (@pxref{Frame Titles}) | 2173 | structure is used for constructing frame titles (@pxref{Frame Titles}), |
| 2171 | and header lines (@pxref{Header Lines}). | 2174 | header lines (@pxref{Header Lines}), and tab lines (@pxref{Tab Lines}). |
| 2172 | 2175 | ||
| 2173 | A mode line construct may be as simple as a fixed string of text, | 2176 | A mode line construct may be as simple as a fixed string of text, |
| 2174 | but it usually specifies how to combine fixed strings with variables' | 2177 | but it usually specifies how to combine fixed strings with variables' |
| @@ -2816,6 +2819,31 @@ window that is two lines tall cannot display both a mode line and a | |||
| 2816 | header line at once; if it has a mode line, then it does not display a | 2819 | header line at once; if it has a mode line, then it does not display a |
| 2817 | header line. | 2820 | header line. |
| 2818 | 2821 | ||
| 2822 | @node Tab Lines | ||
| 2823 | @subsection Window Tab Lines | ||
| 2824 | @cindex tab line (of a window) | ||
| 2825 | @cindex window tab line | ||
| 2826 | |||
| 2827 | A window can have a @dfn{tab line} at the top. If both the tab line | ||
| 2828 | and header line are visible, the tab line appears above the header line. | ||
| 2829 | The tab line feature is controlled like the mode line feature, except | ||
| 2830 | that it's controlled by @code{tab-line-format}. Unlike the mode line, | ||
| 2831 | the tab line is only expected to be used to display a list of tabs | ||
| 2832 | (@pxref{Tab Line,,, emacs, The GNU Emacs Manual}) or the window | ||
| 2833 | tool bar (@pxref{Window Tool Bar,,, emacs, The GNU Emacs Manual}): | ||
| 2834 | |||
| 2835 | @defvar tab-line-format | ||
| 2836 | This variable, local in every buffer, specifies how to display the tab | ||
| 2837 | line, for windows displaying the buffer. The format of the value is the | ||
| 2838 | same as for @code{mode-line-format} (@pxref{Mode Line Data}). It is | ||
| 2839 | normally @code{nil}, so that ordinary buffers have no tab line. | ||
| 2840 | @end defvar | ||
| 2841 | |||
| 2842 | @defun window-tab-line-height &optional window | ||
| 2843 | This function returns the height in pixels of @var{window}'s tab line. | ||
| 2844 | @var{window} must be a live window, and defaults to the selected window. | ||
| 2845 | @end defun | ||
| 2846 | |||
| 2819 | @node Emulating Mode Line | 2847 | @node Emulating Mode Line |
| 2820 | @subsection Emulating Mode Line Formatting | 2848 | @subsection Emulating Mode Line Formatting |
| 2821 | 2849 | ||