Variable: mode-line-format
mode-line-format is a customizable and buffer-local variable defined
in buffer.c.
Documentation
Template for displaying mode line for a window's buffer.
The value may be nil, a string, a symbol or a list.
A value of nil means don't display a mode line.
For any symbol other than t or nil, the symbol's value is processed as
a mode line construct. As a special exception, if that value is a
string, the string is processed verbatim, without handling any
%-constructs (see below). Also, unless the symbol has a non-nil
risky-local-variable property, all properties in any strings, as
well as all :eval and :propertize forms in the value, are ignored.
When the value is processed, the window's buffer is temporarily the current buffer.
A list whose car is a string or list is processed by processing each
of the list elements recursively, as separate mode line constructs,
and concatenating the results.
A list of the form (:eval FORM) is processed by evaluating FORM and
using the result as a mode line construct. Be careful--FORM should
not load any files, because that can cause an infinite recursion.
A list of the form (:propertize ELT PROPS...) is processed by
processing ELT as the mode line construct, and adding the text
properties PROPS to the result.
A list whose car is a symbol is processed by examining the symbol's
value, and, if that value is non-nil, processing the cadr of the list
recursively; and if that value is nil, processing the caddr of the
list recursively.
A list whose car is an integer is processed by processing the cadr of
the list, and padding (if the number is positive) or truncating (if
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.
%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(var)/column-number-mode(fun) must be non-nil.
%C -- Like %c, but the leftmost column is displayed as one.
%i -- print the size of the buffer.
%I -- like %i, but use k, M, G, etc., to abbreviate.
%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.
%n -- print Narrow if appropriate.
%t -- visited file is text or binary (if OS supports this distinction).
%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.
Decimal digits after the % specify field width to which to pad.
Probably introduced at or before Emacs version 18.
Source Code
// Defined in /usr/src/emacs/src/buffer.c
// Skipping highlighting due to helpful-max-highlight.
DEFVAR_PER_BUFFER ("mode-line-format", &BVAR (current_buffer, mode_line_format),
Qnil,
doc: /* Template for displaying mode line for a window's buffer.
The value may be nil, a string, a symbol or a list.
A value of nil means don't display a mode line.
For any symbol other than t or nil, the symbol's value is processed as
a mode line construct. As a special exception, if that value is a
string, the string is processed verbatim, without handling any
%-constructs (see below). Also, unless the symbol has a non-nil
`risky-local-variable' property, all properties in any strings, as
well as all :eval and :propertize forms in the value, are ignored.
When the value is processed, the window's buffer is temporarily the
current buffer.
A list whose car is a string or list is processed by processing each
of the list elements recursively, as separate mode line constructs,
and concatenating the results.
A list of the form `(:eval FORM)' is processed by evaluating FORM and
using the result as a mode line construct. Be careful--FORM should
not load any files, because that can cause an infinite recursion.
A list of the form `(:propertize ELT PROPS...)' is processed by
processing ELT as the mode line construct, and adding the text
properties PROPS to the result.
A list whose car is a symbol is processed by examining the symbol's
value, and, if that value is non-nil, processing the cadr of the list
recursively; and if that value is nil, processing the caddr of the
list recursively.
A list whose car is an integer is processed by processing the cadr of
the list, and padding (if the number is positive) or truncating (if
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.
%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.
%C -- Like %c, but the leftmost column is displayed as one.
%i -- print the size of the buffer.
%I -- like %i, but use k, M, G, etc., to abbreviate.
%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.
%n -- print Narrow if appropriate.
%t -- visited file is text or binary (if OS supports this distinction).
%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.
Decimal digits after the % specify field width to which to pad. */);
DEFVAR_PER_BUFFER ("major-mode", &BVAR (current_buffer, major_mode),
Qsymbolp,
doc: /* Symbol for current buffer's major mode.
The default value (normally `fundamental-mode') affects new buffers.
A value of nil means to use the current buffer's major mode, provided
it is not marked as "special". */);
DEFVAR_PER_BUFFER ("local-minor-modes",
&BVAR (current_buffer, local_minor_modes),
Qnil,
doc: /* Minor modes currently active in the current buffer.
This is a list of symbols, or nil if there are no minor modes active. */);
DEFVAR_PER_BUFFER ("mode-name", &BVAR (current_buffer, mode_name),
Qnil,
doc: /* Pretty name of current buffer's major mode.
Usually a string, but can use any of the constructs for `mode-line-format',
which see.
Format with `format-mode-line' to produce a string value. */);
DEFVAR_PER_BUFFER ("local-abbrev-table", &BVAR (current_buffer, abbrev_table), Qnil,
doc: /* Local (mode-specific) abbrev table of current buffer. */);
DEFVAR_PER_BUFFER ("abbrev-mode", &BVAR (current_buffer, abbrev_mode), Qnil,
doc: /* Non-nil if Abbrev mode is enabled.
Use the command `abbrev-mode' to change this variable. */);
DEFVAR_PER_BUFFER ("case-fold-search", &BVAR (current_buffer, case_fold_search),
Qnil,
doc: /* Non-nil if searches and matches should ignore case. */);
DEFVAR_PER_BUFFER ("fill-column", &BVAR (current_buffer, fill_column),
Qintegerp,
doc: /* Column beyond which automatic line-wrapping should happen.
It is used by filling commands, such as `fill-region' and `fill-paragraph',
and by `auto-fill-mode', which see.
See also `current-fill-column'.
Interactively, you can set the buffer local value using \\[set-fill-column]. */);
DEFVAR_PER_BUFFER ("left-margin", &BVAR (current_buffer, left_margin),
Qintegerp,
doc: /* Column for the default `indent-line-function' to indent to.
Linefeed indents to this column in Fundamental mode. */);
DEFVAR_PER_BUFFER ("tab-width", &BVAR (current_buffer, tab_width),
Qintegerp,
doc: /* Distance between tab stops (for display of tab characters), in columns.
This controls the width of a TAB character on display.
The value should be a positive integer.
Note that this variable doesn't necessarily affect the size of the
indentation step. However, if the major mode's indentation facility
inserts one or more TAB characters, this variable will affect the
indentation step as well, even if `indent-tabs-mode' is non-nil. */);
DEFVAR_PER_BUFFER ("ctl-arrow", &BVAR (current_buffer, ctl_arrow), Qnil,
doc: /* Non-nil means display control chars with uparrow `^'.
A value of nil means use backslash `\\' and octal digits.
This variable does not apply to characters whose display is specified in
the current display table (if there is one; see `standard-display-table'). */);
DEFVAR_PER_BUFFER ("enable-multibyte-characters",
&BVAR (current_buffer, enable_multibyte_characters),
Qnil,
doc: /* Non-nil means the buffer contents are regarded as multi-byte characters.
Otherwise they are regarded as unibyte. This affects the display,
file I/O and the behavior of various editing commands.
This variable is buffer-local but you cannot set it directly;
use the function `set-buffer-multibyte' to change a buffer's representation.
To prevent any attempts to set it or make it buffer-local, Emacs will
signal an error in those cases.
See also Info node `(elisp)Text Representations'. */);
make_symbol_constant (intern_c_string ("enable-multibyte-characters"));
DEFVAR_PER_BUFFER ("buffer-file-coding-system",
&BVAR (current_buffer, buffer_file_coding_system), Qnil,
doc: /* Coding system to be used for encoding the buffer contents on saving.
This variable applies to saving the buffer, and also to `write-region'
and other functions that use `write-region'.
It does not apply to sending output to subprocesses, however.
If this is nil, the buffer is saved without any code conversion
unless some coding system is specified in `file-coding-system-alist'
for the buffer file.
If the text to be saved cannot be encoded as specified by this variable,
an alternative encoding is selected by `select-safe-coding-system', which see.
The variable `coding-system-for-write', if non-nil, overrides this variable.
This variable is never applied to a way of decoding a file while reading it. */);
DEFVAR_PER_BUFFER ("bidi-display-reordering",
&BVAR (current_buffer, bidi_display_reordering), Qnil,
doc: /* Non-nil means reorder bidirectional text for display in the visual order.
Setting this to nil is intended for use in debugging the display code.
Don't set to nil in normal sessions, as that is not supported.
See also `bidi-paragraph-direction'; setting that non-nil might
speed up redisplay. */);
DEFVAR_PER_BUFFER ("bidi-paragraph-start-re",
&BVAR (current_buffer, bidi_paragraph_start_re), Qnil,
doc: /* If non-nil, a regexp matching a line that starts OR separates paragraphs.
The value of nil means to use empty lines as lines that start and
separate paragraphs.
When Emacs displays bidirectional text, it by default computes
the base paragraph direction separately for each paragraph.
Setting this variable changes the places where paragraph base
direction is recomputed.
The regexp is always matched after a newline, so it is best to
anchor it by beginning it with a "^".
If you change the value of this variable, be sure to change
the value of `bidi-paragraph-separate-re' accordingly. For
example, to have a single newline behave as a paragraph separator,
set both these variables to "^".
See also `bidi-paragraph-direction'. */);
DEFVAR_PER_BUFFER ("bidi-paragraph-separate-re",
&BVAR (current_buffer, bidi_paragraph_separate_re), Qnil,
doc: /* If non-nil, a regexp matching a line that separates paragraphs.
The value of nil means to use empty lines as paragraph separators.
When Emacs displays bidirectional text, it by default computes
the base paragraph direction separately for each paragraph.
Setting this variable changes the places where paragraph base
direction is recomputed.
The regexp is always matched after a newline, so it is best to
anchor it by beginning it with a "^".
If you change the value of this variable, be sure to change
the value of `bidi-paragraph-start-re' accordingly. For
example, to have a single newline behave as a paragraph separator,
set both these variables to "^".
See also `bidi-paragraph-direction'. */);
DEFVAR_PER_BUFFER ("bidi-paragraph-direction",
&BVAR (current_buffer, bidi_paragraph_direction), Qnil,
doc: /* If non-nil, forces directionality of text paragraphs in the buffer.
If this is nil (the default), the direction of each paragraph is
determined by the first strong directional character of its text.
The values of `right-to-left' and `left-to-right' override that.
Any other value is treated as nil.
This variable has no effect unless the buffer's value of
`bidi-display-reordering' is non-nil. */);
DEFVAR_PER_BUFFER ("truncate-lines", &BVAR (current_buffer, truncate_lines), Qnil,
doc: /* Non-nil means do not display continuation lines.
Instead, give each line of text just one screen line.
Note that this is overridden by the variable
`truncate-partial-width-windows' if that variable is non-nil
and this buffer is not full-frame width.
Minibuffers set this variable to nil.
Don't set this to a non-nil value when `visual-line-mode' is
turned on, as it could produce confusing results. */);
DEFVAR_PER_BUFFER ("word-wrap", &BVAR (current_buffer, word_wrap), Qnil,
doc: /* Non-nil means to use word-wrapping for continuation lines.
When word-wrapping is on, continuation lines are wrapped at the space
or tab character nearest to the right window edge.
If nil, continuation lines are wrapped at the right screen edge.
This variable has no effect if long lines are truncated (see
`truncate-lines' and `truncate-partial-width-windows'). If you use
word-wrapping, you might want to reduce the value of
`truncate-partial-width-windows', since wrapping can make text readable
in narrower windows.
Instead of setting this variable directly, most users should use
Visual Line mode. Visual Line mode, when enabled, sets `word-wrap'
to t, and additionally redefines simple editing commands to act on
visual lines rather than logical lines. See the documentation of
`visual-line-mode'. */);
DEFVAR_PER_BUFFER ("default-directory", &BVAR (current_buffer, directory),
Qstringp,
doc: /* Name of default directory of current buffer.
It should be an absolute directory name; on GNU and Unix systems,
these names start with `/' or `~' and end with `/'.
To interactively change the default directory, use command `cd'. */);
DEFVAR_PER_BUFFER ("auto-fill-function", &BVAR (current_buffer, auto_fill_function),
Qnil,
doc: /* Function called (if non-nil) to perform auto-fill.
It is called after self-inserting any character specified in
the `auto-fill-chars' table.
NOTE: This variable is not a hook;
its value may not be a list of functions. */);
DEFVAR_PER_BUFFER ("buffer-file-name", &BVAR (current_buffer, filename),
Qstringp,
doc: /* Name of file visited in current buffer, or nil if not visiting a file.
This should be an absolute file name. */);
DEFVAR_PER_BUFFER ("buffer-file-truename", &BVAR (current_buffer, file_truename),
Qstringp,
doc: /* Abbreviated truename of file visited in current buffer, or nil if none.
The truename of a file is calculated by `file-truename'
and then abbreviated with `abbreviate-file-name'. */);
DEFVAR_PER_BUFFER ("buffer-auto-save-file-name",
&BVAR (current_buffer, auto_save_file_name),
Qstringp,
doc: /* Name of file for auto-saving current buffer.
If it is nil, that means don't auto-save this buffer. */);
DEFVAR_PER_BUFFER ("buffer-read-only", &BVAR (current_buffer, read_only), Qnil,
doc: /* Non-nil if this buffer is read-only. */);
DEFVAR_PER_BUFFER ("buffer-backed-up", &BVAR (current_buffer, backed_up), Qnil,
doc: /* Non-nil if this buffer's file has been backed up.
Backing up is done before the first time the file is saved. */);
DEFVAR_PER_BUFFER ("buffer-saved-size", &BVAR (current_buffer, save_length),
Qintegerp,
doc: /* Length of current buffer when last read in, saved or auto-saved.
0 initially.
-1 means auto-saving turned off until next real save.
If you set this to -2, that means don't turn off auto-saving in this buffer
if its text size shrinks. If you use `buffer-swap-text' on a buffer,
you probably should set this to -2 in that buffer. */);
DEFVAR_PER_BUFFER ("selective-display", &BVAR (current_buffer, selective_display),
Qnil,
doc: /* Non-nil enables selective display.
An integer N as value means display only lines
that start with less than N columns of space.
A value of t means that the character ^M makes itself and
all the rest of the line invisible; also, when saving the buffer
in a file, save the ^M as a newline. This usage is obsolete; use
overlays or text properties instead. */);
DEFVAR_PER_BUFFER ("selective-display-ellipses",
&BVAR (current_buffer, selective_display_ellipses),
Qnil,
doc: /* Non-nil means display ... on previous line when a line is invisible. */);
DEFVAR_PER_BUFFER ("overwrite-mode", &BVAR (current_buffer, overwrite_mode),
Qoverwrite_mode,
doc: /* Non-nil if self-insertion should replace existing text.
The value should be one of `overwrite-mode-textual',
`overwrite-mode-binary', or nil.
If it is `overwrite-mode-textual', self-insertion still
inserts at the end of a line, and inserts when point is before a tab,
until the tab is filled in.
If `overwrite-mode-binary', self-insertion replaces newlines and tabs too. */);
DEFVAR_PER_BUFFER ("buffer-display-table", &BVAR (current_buffer, display_table),
Qnil,
doc: /* Display table that controls display of the contents of current buffer.
If this variable is nil, the value of `standard-display-table' is used.
Each window can have its own, overriding display table, see
`set-window-display-table' and `window-display-table'.
The display table is a char-table created with `make-display-table'.
A char-table is an array indexed by character codes. Normal array
primitives `aref' and `aset' can be used to access elements of a char-table.
Each of the char-table elements control how to display the corresponding
text character: the element at index C in the table says how to display
the character whose code is C. Each element should be a vector of
characters or nil. The value nil means display the character in the
default fashion; otherwise, the characters from the vector are delivered
to the screen instead of the original character.
For example, (aset buffer-display-table ?X [?Y]) tells Emacs
to display a capital Y instead of each X character.
In addition, a char-table has six extra slots to control the display of:
the end of a truncated screen line (extra-slot 0, a single character);
the end of a continued line (extra-slot 1, a single character);
the escape character used to display character codes in octal
(extra-slot 2, a single character);
the character used as an arrow for control characters (extra-slot 3,
a single character);
the decoration indicating the presence of invisible lines (extra-slot 4,
a vector of characters);
the character used to draw the border between side-by-side windows
(extra-slot 5, a single character).
See also the functions `display-table-slot' and `set-display-table-slot'. */);
DEFVAR_PER_BUFFER ("left-margin-width", &BVAR (current_buffer, left_margin_cols),
Qintegerp,
doc: /* Width in columns of left marginal area for display of a buffer.
A value of nil means no marginal area.
Setting this variable does not take effect until a new buffer is displayed
in a window. To make the change take effect, call `set-window-buffer'. */);
DEFVAR_PER_BUFFER ("right-margin-width", &BVAR (current_buffer, right_margin_cols),
Qintegerp,
doc: /* Width in columns of right marginal area for display of a buffer.
A value of nil means no marginal area.
Setting this variable does not take effect until a new buffer is displayed
in a window. To make the change take effect, call `set-window-buffer'. */);
DEFVAR_PER_BUFFER ("left-fringe-width", &BVAR (current_buffer, left_fringe_width),
Qintegerp,
doc: /* Width of this buffer's left fringe (in pixels).
A value of 0 means no left fringe is shown in this buffer's window.
A value of nil means to use the left fringe width from the window's frame.
Setting this variable does not take effect until a new buffer is displayed
in a window. To make the change take effect, call `set-window-buffer'. */);
DEFVAR_PER_BUFFER ("right-fringe-width", &BVAR (current_buffer, right_fringe_width),
Qintegerp,
doc: /* Width of this buffer's right fringe (in pixels).
A value of 0 means no right fringe is shown in this buffer's window.
A value of nil means to use the right fringe width from the window's frame.
Setting this variable does not take effect until a new buffer is displayed
in a window. To make the change take effect, call `set-window-buffer'. */);
DEFVAR_PER_BUFFER ("fringes-outside-margins", &BVAR (current_buffer, fringes_outside_margins),
Qnil,
doc: /* Non-nil means to display fringes outside display margins.
A value of nil means to display fringes between margins and buffer text.
Setting this variable does not take effect until a new buffer is displayed
in a window. To make the change take effect, call `set-window-buffer'. */);
DEFVAR_PER_BUFFER ("scroll-bar-width", &BVAR (current_buffer, scroll_bar_width),
Qintegerp,
doc: /* Width of this buffer's vertical scroll bars in pixels.
A value of nil means to use the scroll bar width from the window's frame. */);
DEFVAR_PER_BUFFER ("scroll-bar-height", &BVAR (current_buffer, scroll_bar_height),
Qintegerp,
doc: /* Height of this buffer's horizontal scroll bars in pixels.
A value of nil means to use the scroll bar height from the window's frame. */);
DEFVAR_PER_BUFFER ("vertical-scroll-bar", &BVAR (current_buffer, vertical_scroll_bar_type),
Qvertical_scroll_bar,
doc: /* Position of this buffer's vertical scroll bar.
The value takes effect whenever you tell a window to display this buffer;
for instance, with `set-window-buffer' or when `display-buffer' displays it.
A value of `left' or `right' means put the vertical scroll bar at that side
of the window; a value of nil means don't show any vertical scroll bars.
A value of t (the default) means do whatever the window's frame specifies. */);
DEFVAR_PER_BUFFER ("horizontal-scroll-bar", &BVAR (current_buffer, horizontal_scroll_bar_type),
Qnil,
doc: /* Position of this buffer's horizontal scroll bar.
The value takes effect whenever you tell a window to display this buffer;
for instance, with `set-window-buffer' or when `display-buffer' displays it.
A value of `bottom' means put the horizontal scroll bar at the bottom of
the window; a value of nil means don't show any horizontal scroll bars.
A value of t (the default) means do whatever the window's frame
specifies. */);
DEFVAR_PER_BUFFER ("indicate-empty-lines",
&BVAR (current_buffer, indicate_empty_lines), Qnil,
doc: /* Visually indicate unused ("empty") screen lines after the buffer end.
If non-nil, a bitmap is displayed in the left fringe of a window
on graphical displays for each screen line that doesn't correspond
to any buffer text. */);
DEFVAR_PER_BUFFER ("indicate-buffer-boundaries",
&BVAR (current_buffer, indicate_buffer_boundaries), Qnil,
doc: /* Visually indicate buffer boundaries and scrolling.
If non-nil, the first and last line of the buffer are marked in the fringe
of a window on graphical displays with angle bitmaps, or if the window can be
scrolled, the top and bottom line of the window are marked with up and down
arrow bitmaps.
If value is a symbol `left' or `right', both angle and arrow bitmaps
are displayed in the left or right fringe, resp. Any other value
that doesn't look like an alist means display the angle bitmaps in
the left fringe but no arrows.
You can exercise more precise control by using an alist as the
value. Each alist element (INDICATOR . POSITION) specifies
where to show one of the indicators. INDICATOR is one of `top',
`bottom', `up', `down', or t, which specifies the default position,
and POSITION is one of `left', `right', or nil, meaning do not show
this indicator.
For example, ((top . left) (t . right)) places the top angle bitmap in
left fringe, the bottom angle bitmap in right fringe, and both arrow
bitmaps in right fringe. To show just the angle bitmaps in the left
fringe, but no arrow bitmaps, use ((top . left) (bottom . left)). */);
DEFVAR_PER_BUFFER ("fringe-indicator-alist",
&BVAR (current_buffer, fringe_indicator_alist), Qnil,
doc: /* Mapping from logical to physical fringe indicator bitmaps.
The value is an alist where each element (INDICATOR . BITMAPS)
specifies the fringe bitmaps used to display a specific logical
fringe indicator.
INDICATOR specifies the logical indicator type which is one of the
following symbols: `truncation' , `continuation', `overlay-arrow',
`top', `bottom', `top-bottom', `up', `down', empty-line', or `unknown'.
BITMAPS is a list of symbols (LEFT RIGHT [LEFT1 RIGHT1]) which specifies
the actual bitmap shown in the left or right fringe for the logical
indicator. LEFT and RIGHT are the bitmaps shown in the left and/or
right fringe for the specific indicator. The LEFT1 or RIGHT1 bitmaps
are used only for the `bottom' and `top-bottom' indicators when the
last (only) line has no final newline. BITMAPS may also be a single
symbol which is used in both left and right fringes. */);
DEFVAR_PER_BUFFER ("fringe-cursor-alist",
&BVAR (current_buffer, fringe_cursor_alist), Qnil,
doc: /* Mapping from logical to physical fringe cursor bitmaps.
The value is an alist where each element (CURSOR . BITMAP)
specifies the fringe bitmaps used to display a specific logical
cursor type in the fringe.
CURSOR specifies the logical cursor type which is one of the following
symbols: `box' , `hollow', `bar', `hbar', or `hollow-small'. The last
one is used to show a hollow cursor on narrow lines display lines
where the normal hollow cursor will not fit.
BITMAP is the corresponding fringe bitmap shown for the logical
cursor type. */);
DEFVAR_PER_BUFFER ("scroll-up-aggressively",
&BVAR (current_buffer, scroll_up_aggressively), Qfraction,
doc: /* How far to scroll windows upward.
If you move point off the bottom, the window scrolls automatically.
This variable controls how far it scrolls. The value nil, the default,
means scroll to center point. A fraction means scroll to put point
that fraction of the window's height from the bottom of the window.
When the value is 0.0, point goes at the bottom line, which in the
simple case that you moved off with C-f means scrolling just one line.
1.0 means point goes at the top, so that in that simple case, the
window scrolls by a full window height. Meaningful values are
between 0.0 and 1.0, inclusive. */);
DEFVAR_PER_BUFFER ("scroll-down-aggressively",
&BVAR (current_buffer, scroll_down_aggressively), Qfraction,
doc: /* How far to scroll windows downward.
If you move point off the top, the window scrolls automatically.
This variable controls how far it scrolls. The value nil, the default,
means scroll to center point. A fraction means scroll to put point
that fraction of the window's height from the top of the window.
When the value is 0.0, point goes at the top line, which in the
simple case that you moved off with C-b means scrolling just one line.
1.0 means point goes at the bottom, so that in that simple case, the
window scrolls by a full window height. Meaningful values are
between 0.0 and 1.0, inclusive. */);
DEFVAR_LISP ("before-change-functions", Vbefore_change_functions,
doc: /* List of functions to call before each text change.
Two arguments are passed to each function: the positions of
the beginning and end of the range of old text to be changed.
\(For an insertion, the beginning and end are at the same place.)
No information is given about the length of the text after the change.
Buffer changes made while executing the `before-change-functions'
don't call any before-change or after-change functions.
That's because `inhibit-modification-hooks' is temporarily set non-nil.
If an unhandled error happens in running these functions,
the variable's value remains nil. That prevents the error
from happening repeatedly and making Emacs nonfunctional. */);
Vbefore_change_functions = Qnil;
DEFVAR_LISP ("after-change-functions", Vafter_change_functions,
doc: /* List of functions to call after each text change.
Three arguments are passed to each function: the positions of
the beginning and end of the range of changed text,
and the length in chars of the pre-change text replaced by that range.
\(For an insertion, the pre-change length is zero;
for a deletion, that length is the number of chars deleted,
and the post-change beginning and end are at the same place.)
Buffer changes made while executing the `after-change-functions'
don't call any before-change or after-change functions.
That's because `inhibit-modification-hooks' is temporarily set non-nil.
If an unhandled error happens in running these functions,
the variable's value remains nil. That prevents the error
from happening repeatedly and making Emacs nonfunctional. */);
Vafter_change_functions = Qnil;
DEFVAR_LISP ("first-change-hook", Vfirst_change_hook,
doc: /* A list of functions to call before changing a buffer which is unmodified.
The functions are run using the `run-hooks' function. */);
Vfirst_change_hook = Qnil;
DEFVAR_PER_BUFFER ("buffer-undo-list", &BVAR (current_buffer, undo_list), Qnil,
doc: /* List of undo entries in current buffer.
Recent changes come first; older changes follow newer.
An entry (BEG . END) represents an insertion which begins at
position BEG and ends at position END.
An entry (TEXT . POSITION) represents the deletion of the string TEXT
from (abs POSITION). If POSITION is positive, point was at the front
of the text being deleted; if negative, point was at the end.
An entry (t . TIMESTAMP), where TIMESTAMP is in the style of
`current-time', indicates that the buffer was previously unmodified;
TIMESTAMP is the visited file's modification time, as of that time.
If the modification time of the most recent save is different, this
entry is obsolete.
An entry (t . 0) means the buffer was previously unmodified but
its time stamp was unknown because it was not associated with a file.
An entry (t . -1) is similar, except that it means the buffer's visited
file did not exist.
An entry (nil PROPERTY VALUE BEG . END) indicates that a text property
was modified between BEG and END. PROPERTY is the property name,
and VALUE is the old value.
An entry (apply FUN-NAME . ARGS) means undo the change with
\(apply FUN-NAME ARGS).
An entry (apply DELTA BEG END FUN-NAME . ARGS) supports selective undo
in the active region. BEG and END is the range affected by this entry
and DELTA is the number of characters added or deleted in that range by
this change.
An entry (MARKER . DISTANCE) indicates that the marker MARKER
was adjusted in position by the offset DISTANCE (an integer).
An entry of the form POSITION indicates that point was at the buffer
location given by the integer. Undoing an entry of this form places
point at POSITION.
Entries with value nil mark undo boundaries. The undo command treats
the changes between two undo boundaries as a single step to be undone.
If the value of the variable is t, undo information is not recorded. */);