aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2017-06-24 14:53:35 +0300
committerEli Zaretskii2017-06-24 14:53:35 +0300
commitefedb664666563da6455500ade488fd9726be83a (patch)
tree06ee4c091b32c1809c51bcdd1586e2af0295b942
parent55a9298d63121578cd66ef7f14c14b2160aae77d (diff)
downloademacs-efedb664666563da6455500ade488fd9726be83a.tar.gz
emacs-efedb664666563da6455500ade488fd9726be83a.zip
Rename display-line-width
* etc/NEWS: * src/xdisp.c (syms_of_xdisp, maybe_produce_line_number): * lisp/cus-start.el: Rename display-line-width to display-line-number-width.
-rw-r--r--etc/NEWS6
-rw-r--r--lisp/cus-start.el2
-rw-r--r--src/xdisp.c8
3 files changed, 9 insertions, 7 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 856ebfe35e7..03204beb9ee 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -386,8 +386,10 @@ before the line. If set to 'relative', Emacs will display the line
386number relative to the line showing point. The default is nil, which 386number relative to the line showing point. The default is nil, which
387doesn't display the line numbers. 387doesn't display the line numbers.
388 388
389You can also customize the new variable 'display-lines-width' to 389The new face 'line-number' is used to display the line numbers.
390specify a fixed minimal with of the area allocated to line-number 390
391You can also customize the new variable 'display-line-number-width'
392to specify a fixed minimal with of the area allocated to line-number
391display. The default is nil, meaning that Emacs will dynamically 393display. The default is nil, meaning that Emacs will dynamically
392calculate the area width, enlarging it as needed. Setting it to a 394calculate the area width, enlarging it as needed. Setting it to a
393non-negative integer specifies that as the minimal width; selecting a 395non-negative integer specifies that as the minimal width; selecting a
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index 0fe41d7c3ea..773520c64f2 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -592,7 +592,7 @@ since it could result in memory overflow and make Emacs crash."
592 (const :tag "Relative line numbers" 592 (const :tag "Relative line numbers"
593 :value relative)) 593 :value relative))
594 "26.1") 594 "26.1")
595 (display-line-width display 595 (display-line-number-width display
596 (choice 596 (choice
597 (const :tag "Dynamically computed" 597 (const :tag "Dynamically computed"
598 :value nil) 598 :value nil)
diff --git a/src/xdisp.c b/src/xdisp.c
index 5f86f0bfde6..d23b1768d68 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -20754,8 +20754,8 @@ maybe_produce_line_number (struct it *it)
20754 /* Compute the required width if needed. */ 20754 /* Compute the required width if needed. */
20755 if (!it->lnum_width) 20755 if (!it->lnum_width)
20756 { 20756 {
20757 if (NATNUMP (Vdisplay_line_width)) 20757 if (NATNUMP (Vdisplay_line_number_width))
20758 it->lnum_width = XFASTINT (Vdisplay_line_width); 20758 it->lnum_width = XFASTINT (Vdisplay_line_number_width);
20759 else 20759 else
20760 { 20760 {
20761 /* Max line number to be displayed cannot be more than 20761 /* Max line number to be displayed cannot be more than
@@ -32408,13 +32408,13 @@ after each newline that comes from buffer text. */);
32408 Fmake_variable_buffer_local (Qdisplay_line_numbers); 32408 Fmake_variable_buffer_local (Qdisplay_line_numbers);
32409 DEFSYM (Qrelative, "relative"); 32409 DEFSYM (Qrelative, "relative");
32410 32410
32411 DEFVAR_LISP ("display-line-width", Vdisplay_line_width, 32411 DEFVAR_LISP ("display-line-number-width", Vdisplay_line_number_width,
32412 doc: /* Minimum width of space reserved for line number display. 32412 doc: /* Minimum width of space reserved for line number display.
32413A positive number means reserve that many columns for line numbers, 32413A positive number means reserve that many columns for line numbers,
32414even if the actual number needs less space. 32414even if the actual number needs less space.
32415The default value of nil means compute the space dynamically. 32415The default value of nil means compute the space dynamically.
32416Any other value is treated as nil. */); 32416Any other value is treated as nil. */);
32417 Vdisplay_line_width = Qnil; 32417 Vdisplay_line_number_width = Qnil;
32418 32418
32419 DEFVAR_BOOL ("inhibit-eval-during-redisplay", inhibit_eval_during_redisplay, 32419 DEFVAR_BOOL ("inhibit-eval-during-redisplay", inhibit_eval_during_redisplay,
32420 doc: /* Non-nil means don't eval Lisp during redisplay. */); 32420 doc: /* Non-nil means don't eval Lisp during redisplay. */);