for 10^6, @samp{G} for 10^9, etc., are used to abbreviate.
@cindex line number display
-@cindex display of line number
+@cindex display of current line number
@findex line-number-mode
The current line number of point appears in the mode line when Line
Number mode is enabled. Use the command @kbd{M-x line-number-mode} to
This section describes variables that control miscellaneous aspects
of the appearance of the Emacs screen. Beginning users can skip it.
+@vindex display-line-numbers
+@cindex number lines in a buffer
+@cindex display line numbers
+ If you want to have Emacs display line numbers for every line in the
+buffer, customize the buffer-local variable
+@code{display-line-numbers}; it is @code{nil} by default. This
+variable can have several different values to support various modes of
+line-number display:
+
+@table @asis
+@item @code{t}
+Display (an absolute) line number before each non-continuation screen
+line that displays buffer text. If the line is a continuation line,
+or if the entire screen line displays a display or an overlay string,
+that line will not be numbered.
+
+@item @code{relative}
+Display relative line numbers before non-continuation lines which show
+buffer text. The line numbers are relative to the line showing point,
+so the numbers grow both up and down as lines become farther from the
+current line.
+
+@item @code{visual}
+This value causes Emacs to count lines visually: only lines actually
+shown on the display will be counted (disregarding any lines in
+invisible parts of text), and lines which wrap to consume more than
+one screen line will be numbered that many times. The displayed
+numbers are relative, as with @code{relative} value above. This is
+handy in modes that fold text, such as Outline mode (@pxref{Outline
+Mode}), and need to move by exact number of screen lines.
+
+@item anything else
+Any other non-@code{nil} value is treated as @code{t}.
+@end table
+
+@vindex display-line-numbers-current-absolute
+When Emacs displays relative line numbers, you can control the number
+displayed before the current line, the line showing point. By
+default, Emacs displays the absolute number of the current line there,
+even though all the other line numbers are relative. If you customize
+the variable @code{display-line-numbers-current-absolute} to a
+@code{nil} value, the number displayed for the current line will be
+zero. This is handy if you don't care about the number of the current
+line, and want to leave more horizontal space for text in large
+buffers.
+
+The line numbers are displayed in a special face @code{line-number}.
+The current line number is displayed in a different face,
+@code{line-number-current-line}, so you can make the current line's
+number have a distinct appearance, which will help locating the line
+showing point.
+
@vindex visible-bell
If the variable @code{visible-bell} is non-@code{nil}, Emacs attempts
to make the whole screen blink when it would normally make an audible bell
** You can now provide explicit field numbers in format specifiers.
For example, '(format "%2$s %1$s" "X" "Y")' produces "Y X".
++++
** Emacs now supports optional display of line numbers in the buffer.
This is similar to what linum-mode provides, but much faster and
doesn't usurp the display margin for the line numbers. Customize the
display. The default is nil, meaning that Emacs will dynamically
calculate the area width, enlarging or shrinking it as needed.
Setting it to a non-negative integer specifies that as the minimal
-width; selecting a value that is large enough to display all line
+width; selecting a value that is large enough to display all line
numbers in a buffer will then keep the line-number display area of
constant width at all times, if that is desired.
By default, line numbers are displayed before each non-continuation
line that displays buffer text, i.e. after each newline that came
from buffer text. However, if the value is `visual', every screen
-line will have a number. */);
+line will have a number.
+
+Lisp programs can disable display of a line number of a particular
+screen line by putting the `display-line-numbers-disable' text
+property or overlay property on the first visible character of
+that line. */);
Vdisplay_line_numbers = Qnil;
DEFSYM (Qdisplay_line_numbers, "display-line-numbers");
Fmake_variable_buffer_local (Qdisplay_line_numbers);