ErgoEmacsEmacsLispBlogEmacsLispBuy Tutorial
Web Hosting by 1&1

23.4.1 Mode Line Basics

mode-line-format is a buffer-local variable that holds a mode line construct, a kind of template, which controls what is displayed on the mode line of the current buffer. The value of header-line-format specifies the buffer's header line in the same way. All windows for the same buffer use the same mode-line-format and header-line-format.

For efficiency, Emacs does not continuously recompute the mode line and header line of a window. 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 change the buffer's modification status. If you modify any of the variables referenced by mode-line-format (see Mode Line Variables), or any other variables and data structures that affect how text is displayed (see Display), you may want to force an update of the mode line so as to display the new information or display it in the new way.

— Function: force-mode-line-update &optional all

Force redisplay of the current buffer's mode line and header line. The next redisplay will update the mode line and header line based on the latest values of all relevant variables. With optional non-nil all, force redisplay of all mode lines and header lines.

This function also forces recomputation of the menu bar menus and the frame title.

The selected window's mode line is usually displayed in a different color using the face mode-line. Other windows' mode lines appear in the face mode-line-inactive instead. See Faces.

blog comments powered by Disqus