diff options
Diffstat (limited to 'devdocs/elisp/mode-line-basics.html')
| -rw-r--r-- | devdocs/elisp/mode-line-basics.html | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/devdocs/elisp/mode-line-basics.html b/devdocs/elisp/mode-line-basics.html new file mode 100644 index 00000000..f29a8e16 --- /dev/null +++ b/devdocs/elisp/mode-line-basics.html @@ -0,0 +1,10 @@ + <h4 class="subsection">Mode Line Basics</h4> <p>The contents of each mode line are specified by the buffer-local variable <code>mode-line-format</code> (see <a href="mode-line-top">Mode Line Top</a>). This variable holds a <em>mode line construct</em>: a template that controls what is displayed on the buffer’s mode line. The value of <code>header-line-format</code> specifies the buffer’s header line in the same way. All windows for the same buffer use the same <code>mode-line-format</code> and <code>header-line-format</code> unless a <code>mode-line-format</code> or <code>header-line-format</code> parameter has been specified for that window (see <a href="window-parameters">Window Parameters</a>). </p> <p>For efficiency, Emacs does not continuously recompute each window’s mode line and header line. It does so when circumstances appear to call for it—for instance, if you change the window configuration, switch buffers, narrow or widen the buffer, scroll, or modify the buffer. If you alter any of the variables referenced by <code>mode-line-format</code> or <code>header-line-format</code> (see <a href="mode-line-variables">Mode Line Variables</a>), or any other data structures that affect how text is displayed (see <a href="display">Display</a>), you should use the function <code>force-mode-line-update</code> to update the display. </p> <dl> <dt id="force-mode-line-update">Function: <strong>force-mode-line-update</strong> <em>&optional all</em> +</dt> <dd> +<p>This function forces Emacs to update the current buffer’s mode line and header line, based on the latest values of all relevant variables, during its next redisplay cycle. If the optional argument <var>all</var> is non-<code>nil</code>, it forces an update for all mode lines and header lines. </p> <p>This function also forces an update of the menu bar and frame title. </p> +</dd> +</dl> <p>The selected window’s mode line is usually displayed in a different color using the face <code>mode-line</code>. Other windows’ mode lines appear in the face <code>mode-line-inactive</code> instead. See <a href="faces">Faces</a>. </p> <p>Some modes put a lot of data in the mode line, pushing elements at the end of the mode line off to the right. Emacs can “compress” the mode line if the <code>mode-line-compact</code> variable is non-<code>nil</code> by turning stretches of spaces into a single space. If this variable is <code>long</code>, this is only done when the mode line is wider than the currently selected window. (This computation is approximate, based on the number of characters, and not their displayed width.) This variable can be buffer-local to only compress mode-lines in certain buffers. </p><div class="_attribution"> + <p class="_attribution-p"> + Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br> + <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Mode-Line-Basics.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Mode-Line-Basics.html</a> + </p> +</div> |
