Variable: mode-line-percent-position
mode-line-percent-position is a customizable variable defined in
bindings.el.gz.
Value
(-3 "%p")
Documentation
Specification of "percentage offset" of window through buffer.
This option specifies both the field width and the type of offset
displayed in mode-line-position, a component of the default
mode-line-format.
Since mode-line layout is a delicate matter, given the restricted
space Emacs has there, and given the hard-to-account-for length of
the percentage offsets produced by this element, we do not recommend
setting this to any value other than those described below (setopt
will show a warning if you try anything else):
nil -- do not display percentage offset
'(-3 "%o") -- size of text above the window top as percentage of
text outside the window
'(-3 "%p") -- size of text above the window top as percentage of
all the buffer text
'(-3 "%P") -- size of text above the window bottom as percentage
of all the buffer text
'(6 "%q") -- percentage offsets of both top and bottom of the
window, separated by a dash
This variable was added, or its default value changed, in Emacs 26.1.
Probably introduced at or before Emacs version 26.1.
Source Code
;; Defined in /usr/src/emacs/lisp/bindings.el.gz
(defcustom mode-line-percent-position '(-3 "%p")
"Specification of \"percentage offset\" of window through buffer.
This option specifies both the field width and the type of offset
displayed in `mode-line-position', a component of the default
`mode-line-format'.
Since mode-line layout is a delicate matter, given the restricted
space Emacs has there, and given the hard-to-account-for length of
the percentage offsets produced by this element, we do not recommend
setting this to any value other than those described below (`setopt'
will show a warning if you try anything else):
nil -- do not display percentage offset
\\='(-3 \"%o\") -- size of text above the window top as percentage of
text outside the window
\\='(-3 \"%p\") -- size of text above the window top as percentage of
all the buffer text
\\='(-3 \"%P\") -- size of text above the window bottom as percentage
of all the buffer text
\\='(6 \"%q\") -- percentage offsets of both top and bottom of the
window, separated by a dash
"
:type '(radio
(const :tag "nil: No offset is displayed" nil)
(const :tag "\"%o\": Proportion of \"travel\" of the window through the buffer"
(-3 "%o"))
(const :tag "\"%p\": Percentage offset of top of window"
(-3 "%p"))
(const :tag "\"%P\": Percentage offset of bottom of window"
(-3 "%P"))
(const :tag "\"%q\": Offsets of both top and bottom of window"
(6 "%q")))
:version "26.1"
:risky t
:group 'mode-line)