aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorPerry E. Metzger2017-05-10 20:57:21 +0300
committerEli Zaretskii2017-05-10 20:57:21 +0300
commit7df0777945efbab390cad0e87b92dd92e0d1853f (patch)
tree419c316a5f793159b1c78bd7f7923af75161fbf8 /src/buffer.c
parente124e07faede2f2d4c6f16af84d796f6305cb8d9 (diff)
downloademacs-7df0777945efbab390cad0e87b92dd92e0d1853f.tar.gz
emacs-7df0777945efbab390cad0e87b92dd92e0d1853f.zip
Implement 1-based column numbering in mode line
* src/xdisp.c (decode_mode_spec): Implement the %C construct. * lisp/bindings.el (column-number-indicator-zero-based): New defcustom. (mode-line-position): Use %C when column-number-indicator-zero-based is nil. * src/xdisp.c (syms_of_xdisp) <frame-title-format>: * src/buffer.c (syms_of_buffer) <mode-line-format>: * doc/lispref/modes.texi (%-Constructs): * doc/lispref/frames.texi (Frame Titles): Document the %C construct. * doc/emacs/display.texi (Optional Mode Line): Document 'column-number-indicator-zero-based'. * etc/NEWS: Mention 'column-number-indicator-zero-based' and the %C construct.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 33ffdf8eb8e..80dbd3318dc 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5486,8 +5486,11 @@ A string is printed verbatim in the mode line except for %-constructs:
5486 For a modified read-only buffer, %* gives % and %+ gives *. 5486 For a modified read-only buffer, %* gives % and %+ gives *.
5487 %s -- print process status. %l -- print the current line number. 5487 %s -- print process status. %l -- print the current line number.
5488 %c -- print the current column number (this makes editing slower). 5488 %c -- print the current column number (this makes editing slower).
5489 Columns are numbered starting from the left margin, and the
5490 leftmost column is displayed as zero.
5489 To make the column number update correctly in all cases, 5491 To make the column number update correctly in all cases,
5490 `column-number-mode' must be non-nil. 5492 `column-number-mode' must be non-nil.
5493 %C -- Like %c, but the leftmost column is displayed as one.
5491 %i -- print the size of the buffer. 5494 %i -- print the size of the buffer.
5492 %I -- like %i, but use k, M, G, etc., to abbreviate. 5495 %I -- like %i, but use k, M, G, etc., to abbreviate.
5493 %p -- print percent of buffer above top of window, or Top, Bot or All. 5496 %p -- print percent of buffer above top of window, or Top, Bot or All.