aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c39
1 files changed, 21 insertions, 18 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 91e9d8abcee..6b0532d95f5 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -20904,8 +20904,8 @@ maybe_produce_line_number (struct it *it)
20904 /* Compute the required width if needed. */ 20904 /* Compute the required width if needed. */
20905 if (!it->lnum_width) 20905 if (!it->lnum_width)
20906 { 20906 {
20907 if (NATNUMP (Vdisplay_line_number_width)) 20907 if (NATNUMP (Vdisplay_line_numbers_width))
20908 it->lnum_width = XFASTINT (Vdisplay_line_number_width); 20908 it->lnum_width = XFASTINT (Vdisplay_line_numbers_width);
20909 20909
20910 /* Max line number to be displayed cannot be more than the one 20910 /* Max line number to be displayed cannot be more than the one
20911 corresponding to the last row of the desired matrix. */ 20911 corresponding to the last row of the desired matrix. */
@@ -32686,35 +32686,38 @@ To add a prefix to continuation lines, use `wrap-prefix'. */);
32686 32686
32687 DEFVAR_LISP ("display-line-numbers", Vdisplay_line_numbers, 32687 DEFVAR_LISP ("display-line-numbers", Vdisplay_line_numbers,
32688 doc: /* Non-nil means display line numbers. 32688 doc: /* Non-nil means display line numbers.
32689If the value is t, display absolute line numbers starting at the 32689If the value is t, display the absolute number of each line of a buffer
32690beginning of the current narrowing, or at buffer beginning. 32690shown in a window. Absolute line numbers count from the beginning of
32691If the value is `relative', display line numbers relative to the 32691the current narrowing, or from buffer beginning. If the value is
32692line showing point. 32692`relative', display for each line not containing the window's point its
32693The value `visual' countse lative screen lines rather than 32693relative number instead, i.e. the number of the line relative to the
32694physical line: by default, line numbers are displayed before each 32694line showing the window's point.
32695non-continuation line that displays buffer text, i.e. after each 32695
32696newline that came from buffer text. However, if the value is `visual', 32696In either case, line numbers are displayed at the beginning of each
32697every screen line will have a number. 32697non-continuation line that displays buffer text, i.e. after each newline
32698character that comes from the buffer. The value `visual' is like
32699`relative' but counts screen lines instead of buffer lines. In practice
32700this means that continuation lines count as well when calculating the
32701relative number of a line.
32698 32702
32699Lisp programs can disable display of a line number of a particular 32703Lisp programs can disable display of a line number of a particular
32700screen line by putting the `display-line-numbers-disable' text 32704buffer line by putting the `display-line-numbers-disable' text property
32701property or overlay property on the first visible character of 32705or overlay property on the first visible character of that line. */);
32702that line. */);
32703 Vdisplay_line_numbers = Qnil; 32706 Vdisplay_line_numbers = Qnil;
32704 DEFSYM (Qdisplay_line_numbers, "display-line-numbers"); 32707 DEFSYM (Qdisplay_line_numbers, "display-line-numbers");
32705 Fmake_variable_buffer_local (Qdisplay_line_numbers); 32708 Fmake_variable_buffer_local (Qdisplay_line_numbers);
32706 DEFSYM (Qrelative, "relative"); 32709 DEFSYM (Qrelative, "relative");
32707 DEFSYM (Qvisual, "visual"); 32710 DEFSYM (Qvisual, "visual");
32708 32711
32709 DEFVAR_LISP ("display-line-number-width", Vdisplay_line_number_width, 32712 DEFVAR_LISP ("display-line-numbers-width", Vdisplay_line_numbers_width,
32710 doc: /* Minimum width of space reserved for line number display. 32713 doc: /* Minimum width of space reserved for line number display.
32711A positive number means reserve that many columns for line numbers, 32714A positive number means reserve that many columns for line numbers,
32712even if the actual number needs less space. 32715even if the actual number needs less space.
32713The default value of nil means compute the space dynamically. 32716The default value of nil means compute the space dynamically.
32714Any other value is treated as nil. */); 32717Any other value is treated as nil. */);
32715 Vdisplay_line_number_width = Qnil; 32718 Vdisplay_line_numbers_width = Qnil;
32716 DEFSYM (Qdisplay_line_number_width, "display-line-number-width"); 32719 DEFSYM (Qdisplay_line_numbers_width, "display-line-number-width");
32717 Fmake_variable_buffer_local (Qdisplay_line_number_width); 32720 Fmake_variable_buffer_local (Qdisplay_line_numbers_width);
32718 32721
32719 DEFVAR_LISP ("display-line-numbers-current-absolute", 32722 DEFVAR_LISP ("display-line-numbers-current-absolute",
32720 Vdisplay_line_numbers_current_absolute, 32723 Vdisplay_line_numbers_current_absolute,