summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhil Sainty <psainty@orcon.net.nz>2022-08-14 23:17:38 +1200
committerPhil Sainty <psainty@orcon.net.nz>2023-03-27 00:36:47 +1300
commit28db56d5f04879675aabb3fb2195ef2dd27716ba (patch)
tree7e0fe2d7159d02f6d4ae30061036a9ed4a6b9fa8 /src
parentd4a3f64ad75444fa26f707aec5b642a900507a41 (diff)
downloademacs-28db56d5f04879675aabb3fb2195ef2dd27716ba.tar.gz
* src/buffer.c (mode-line-format): Reorder and reformat %-construct docs
The original formatting dates back to the earliest commits. It saved a few lines but was harder to follow. As windows are typically taller now than the terminals of the time, this reformatting now makes better sense for readabiity. See bug#57080. * doc/lispref/modes.texi: Order change for consistency. Add index.
Diffstat (limited to 'src')
-rw-r--r--src/buffer.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 0c740775e5b..31c08cf3650 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5124,35 +5124,38 @@ A list whose car is an integer is processed by processing the cadr of
negative) to the width specified by that number.
A string is printed verbatim in the mode line except for %-constructs:
- %b -- print buffer name. %f -- print visited file name.
- %F -- print frame name.
- %* -- print %, * or hyphen. %+ -- print *, % or hyphen.
- %& is like %*, but ignore read-only-ness.
- % means buffer is read-only and * means it is modified.
- For a modified read-only buffer, %* gives % and %+ gives *.
- %s -- print process status. %l -- print the current line number.
+ %b -- print buffer name.
%c -- print the current column number (this makes editing slower).
Columns are numbered starting from the left margin, and the
leftmost column is displayed as zero.
To make the column number update correctly in all cases,
- `column-number-mode' must be non-nil.
+ `column-number-mode' must be non-nil.
%C -- Like %c, but the leftmost column is displayed as one.
+ %e -- print error message about full memory.
+ %f -- print visited file name.
+ %F -- print frame name.
%i -- print the size of the buffer.
%I -- like %i, but use k, M, G, etc., to abbreviate.
+ %l -- print the current line number.
+ %n -- print Narrow if appropriate.
%o -- print percent of window travel through buffer, or Top, Bot or All.
%p -- print percent of buffer above top of window, or Top, Bot or All.
%P -- print percent of buffer above bottom of window, perhaps plus Top,
or print Bottom or All.
%q -- print percent of buffer above both the top and the bottom of the
window, separated by β€˜-’, or β€˜All’.
- %n -- print Narrow if appropriate.
+ %s -- print process status.
%z -- print mnemonics of keyboard, terminal, and buffer coding systems.
%Z -- like %z, but including the end-of-line format.
- %e -- print error message about full memory.
- %@ -- print @ or hyphen. @ means that default-directory is on a
- remote machine.
- %[ -- print one [ for each recursive editing level. %] similar.
- %% -- print %. %- -- print infinitely many dashes.
+ %& -- print * if the buffer is modified, otherwise hyphen.
+ %+ -- print *, % or hyphen (modified, read-only, neither).
+ %* -- print %, * or hyphen (read-only, modified, neither).
+ For a modified read-only buffer, %+ prints * and %* prints %.
+ %@ -- print @ if default-directory is on a remote machine, else hyphen.
+ %[ -- print one [ for each recursive editing level.
+ %] -- print one ] for each recursive editing level.
+ %- -- print enough dashes to fill the mode line.
+ %% -- print %.
Decimal digits after the % specify field width to which to pad. */);
DEFVAR_PER_BUFFER ("major-mode", &BVAR (current_buffer, major_mode),