diff options
| author | Phil Sainty | 2022-08-14 23:14:51 +1200 |
|---|---|---|
| committer | Phil Sainty | 2023-03-27 00:33:01 +1300 |
| commit | 7466909df44e4030534988035da0c87b8126f79e (patch) | |
| tree | c05b1a6f292058587533feaeedb4f292a6527388 | |
| parent | 73f186b0c9345ca386bce7f441589c3530685fae (diff) | |
| download | emacs-7466909df44e4030534988035da0c87b8126f79e.tar.gz emacs-7466909df44e4030534988035da0c87b8126f79e.zip | |
Improve docs for global-mode-string / %M construct
* src/xdisp.c (global-mode-string): Update docstring.
* doc/lispref/modes.texi: Update manual.
| -rw-r--r-- | doc/lispref/modes.texi | 25 | ||||
| -rw-r--r-- | src/xdisp.c | 2 |
2 files changed, 16 insertions, 11 deletions
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index fff1ea65b07..30baa7f4d80 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi | |||
| @@ -2349,18 +2349,19 @@ enabled separately in each buffer. | |||
| 2349 | 2349 | ||
| 2350 | @defvar global-mode-string | 2350 | @defvar global-mode-string |
| 2351 | This variable holds a mode line construct that, by default, appears in | 2351 | This variable holds a mode line construct that, by default, appears in |
| 2352 | the mode line just after the @code{which-function-mode} minor mode if | 2352 | the mode line as part of @code{mode-line-misc-info}, just after the |
| 2353 | set, else after @code{mode-line-modes}. Elements that are added to | 2353 | @code{which-function-mode} information if that minor mode is enabled, |
| 2354 | this construct should normally end in a space (to ensure that | 2354 | else after @code{mode-line-modes}. Elements that are added to this |
| 2355 | consecutive @code{global-mode-string} elements display properly). For | 2355 | construct should normally end in a space (to ensure that consecutive |
| 2356 | instance, the command @code{display-time} sets | 2356 | @code{global-mode-string} elements display properly). For instance, |
| 2357 | @code{global-mode-string} to refer to the variable | 2357 | the command @code{display-time} sets @code{global-mode-string} to |
| 2358 | @code{display-time-string}, which holds a string containing the time | 2358 | refer to the variable @code{display-time-string}, which holds a string |
| 2359 | and load information. | 2359 | containing the time and load information. |
| 2360 | 2360 | ||
| 2361 | The @samp{%M} construct substitutes the value of | 2361 | The @samp{%M} construct substitutes the value of |
| 2362 | @code{global-mode-string}, but that is obsolete, since the variable is | 2362 | @code{global-mode-string}. This construct is not used by the default |
| 2363 | included in the mode line from @code{mode-line-format}. | 2363 | mode line, as the variable itself is used in |
| 2364 | @code{mode-line-misc-info}. | ||
| 2364 | @end defvar | 2365 | @end defvar |
| 2365 | 2366 | ||
| 2366 | Here is a simplified version of the default value of | 2367 | Here is a simplified version of the default value of |
| @@ -2440,6 +2441,10 @@ abbreviate. | |||
| 2440 | The current line number of point, counting within the accessible portion | 2441 | The current line number of point, counting within the accessible portion |
| 2441 | of the buffer. | 2442 | of the buffer. |
| 2442 | 2443 | ||
| 2444 | @item %M | ||
| 2445 | The value of @code{global-mode-string} (which is part of | ||
| 2446 | @code{mode-line-misc-info} by default). | ||
| 2447 | |||
| 2443 | @item %n | 2448 | @item %n |
| 2444 | @samp{Narrow} when narrowing is in effect; nothing otherwise (see | 2449 | @samp{Narrow} when narrowing is in effect; nothing otherwise (see |
| 2445 | @code{narrow-to-region} in @ref{Narrowing}). | 2450 | @code{narrow-to-region} in @ref{Narrowing}). |
diff --git a/src/xdisp.c b/src/xdisp.c index 7a4f683c973..754a7c16c76 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -36517,7 +36517,7 @@ This is used for internal purposes. */); | |||
| 36517 | Vinhibit_redisplay = Qnil; | 36517 | Vinhibit_redisplay = Qnil; |
| 36518 | 36518 | ||
| 36519 | DEFVAR_LISP ("global-mode-string", Vglobal_mode_string, | 36519 | DEFVAR_LISP ("global-mode-string", Vglobal_mode_string, |
| 36520 | doc: /* String (or mode line construct) included (normally) in `mode-line-format'. */); | 36520 | doc: /* String (or mode line construct) included (normally) in `mode-line-misc-info'. */); |
| 36521 | Vglobal_mode_string = Qnil; | 36521 | Vglobal_mode_string = Qnil; |
| 36522 | 36522 | ||
| 36523 | DEFVAR_LISP ("overlay-arrow-position", Voverlay_arrow_position, | 36523 | DEFVAR_LISP ("overlay-arrow-position", Voverlay_arrow_position, |