diff options
| author | Eli Zaretskii | 2017-06-24 14:53:35 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-06-24 14:53:35 +0300 |
| commit | efedb664666563da6455500ade488fd9726be83a (patch) | |
| tree | 06ee4c091b32c1809c51bcdd1586e2af0295b942 | |
| parent | 55a9298d63121578cd66ef7f14c14b2160aae77d (diff) | |
| download | emacs-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/NEWS | 6 | ||||
| -rw-r--r-- | lisp/cus-start.el | 2 | ||||
| -rw-r--r-- | src/xdisp.c | 8 |
3 files changed, 9 insertions, 7 deletions
| @@ -386,8 +386,10 @@ before the line. If set to 'relative', Emacs will display the line | |||
| 386 | number relative to the line showing point. The default is nil, which | 386 | number relative to the line showing point. The default is nil, which |
| 387 | doesn't display the line numbers. | 387 | doesn't display the line numbers. |
| 388 | 388 | ||
| 389 | You can also customize the new variable 'display-lines-width' to | 389 | The new face 'line-number' is used to display the line numbers. |
| 390 | specify a fixed minimal with of the area allocated to line-number | 390 | |
| 391 | You can also customize the new variable 'display-line-number-width' | ||
| 392 | to specify a fixed minimal with of the area allocated to line-number | ||
| 391 | display. The default is nil, meaning that Emacs will dynamically | 393 | display. The default is nil, meaning that Emacs will dynamically |
| 392 | calculate the area width, enlarging it as needed. Setting it to a | 394 | calculate the area width, enlarging it as needed. Setting it to a |
| 393 | non-negative integer specifies that as the minimal width; selecting a | 395 | non-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. |
| 32413 | A positive number means reserve that many columns for line numbers, | 32413 | A positive number means reserve that many columns for line numbers, |
| 32414 | even if the actual number needs less space. | 32414 | even if the actual number needs less space. |
| 32415 | The default value of nil means compute the space dynamically. | 32415 | The default value of nil means compute the space dynamically. |
| 32416 | Any other value is treated as nil. */); | 32416 | Any 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. */); |