diff options
author | Phil Sainty <psainty@orcon.net.nz> | 2022-08-14 23:14:51 +1200 |
---|---|---|
committer | Phil Sainty <psainty@orcon.net.nz> | 2023-03-26 23:44:06 +1300 |
commit | 59b7086838e3f82c76977ae0f79b862ab2e7a782 (patch) | |
tree | 7ec68825625f68549e8d77c334aa0ea1312acd4b /doc | |
parent | 207176e6b1c162dddebddcfb1ba7efd270d48b01 (diff) | |
download | emacs-59b7086838e3f82c76977ae0f79b862ab2e7a782.tar.gz |
Improve docs for global-mode-string / %M construct
* src/xdisp.c (global-mode-string): Update docstring.
* doc/lispref/modes.texi: Update manual.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lispref/modes.texi | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index d011962ade7..610ea696e74 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -2357,18 +2357,19 @@ enabled separately in each buffer. @defvar global-mode-string This variable holds a mode line construct that, by default, appears in -the mode line just after the @code{which-function-mode} minor mode if -set, else after @code{mode-line-modes}. Elements that are added to -this construct should normally end in a space (to ensure that -consecutive @code{global-mode-string} elements display properly). For -instance, the command @code{display-time} sets -@code{global-mode-string} to refer to the variable -@code{display-time-string}, which holds a string containing the time -and load information. +the mode line as part of @code{mode-line-misc-info}, just after the +@code{which-function-mode} information if that minor mode is enabled, +else after @code{mode-line-modes}. Elements that are added to this +construct should normally end in a space (to ensure that consecutive +@code{global-mode-string} elements display properly). For instance, +the command @code{display-time} sets @code{global-mode-string} to +refer to the variable @code{display-time-string}, which holds a string +containing the time and load information. The @samp{%M} construct substitutes the value of -@code{global-mode-string}, but that is obsolete, since the variable is -included in the mode line from @code{mode-line-format}. +@code{global-mode-string}. This construct is not used by the default +mode line, as the variable itself is used in +@code{mode-line-misc-info}. @end defvar Here is a simplified version of the default value of @@ -2448,6 +2449,10 @@ abbreviate. The current line number of point, counting within the accessible portion of the buffer. +@item %M +The value of @code{global-mode-string} (which is part of +@code{mode-line-misc-info} by default). + @item %n @samp{Narrow} when narrowing is in effect; nothing otherwise (see @code{narrow-to-region} in @ref{Narrowing}). |