[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 01a98e9: Minor tweaks of new line number display va
From: |
Martin Rudalics |
Subject: |
[Emacs-diffs] master 01a98e9: Minor tweaks of new line number display variables |
Date: |
Wed, 12 Jul 2017 11:37:07 -0400 (EDT) |
branch: master
commit 01a98e918de8b6e3cc8664dd99f02715dc41854b
Author: Martin Rudalics <address@hidden>
Commit: Martin Rudalics <address@hidden>
Minor tweaks of new line number display variables
* src/xdisp.c (Vdisplay_line_numbers): Tweak doc-string.
(Vdisplay_line_number_width): Rename to
Vdisplay_line_numbers_width.
(maybe_produce_line_number): Comply with above rename.
* lisp/cus-start.el (standard):
* lisp/frame.el (top-level):
* etc/NEWS: Comply with renaming of
`display-line-number-width' to `display-line-numbers-width'.
---
etc/NEWS | 2 +-
lisp/cus-start.el | 2 +-
lisp/frame.el | 2 +-
src/xdisp.c | 39 +++++++++++++++++++++------------------
4 files changed, 24 insertions(+), 21 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index 68ebdb3..71a2da1 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -442,7 +442,7 @@ new face 'line-number-current-line' can be customized to
display the
current line's number differently from all the other line numbers; by
default these two faces are identical.
-You can also customize the new variable 'display-line-number-width' to
+You can also customize the new variable 'display-line-numbers-width' to
specify a fixed minimal with of the area allocated to line-number
display. The default is nil, meaning that Emacs will dynamically
calculate the area width, enlarging or shrinking it as needed.
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index e029039..ed913e3 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -594,7 +594,7 @@ since it could result in memory overflow and make Emacs
crash."
(const :tag "Visually relative line
numbers"
:value visual))
"26.1")
- (display-line-number-width display
+ (display-line-numbers-width display
(choice
(const :tag "Dynamically computed"
:value nil)
diff --git a/lisp/frame.el b/lisp/frame.el
index 0e9f385..7d57179 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -2473,7 +2473,7 @@ See also `toggle-frame-maximized'."
wrap-prefix
truncate-lines
display-line-numbers
- display-line-number-width
+ display-line-numbers-width
display-line-numbers-current-absolute
display-line-numbers-widen
bidi-paragraph-direction
diff --git a/src/xdisp.c b/src/xdisp.c
index 91e9d8a..6b0532d 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -20904,8 +20904,8 @@ maybe_produce_line_number (struct it *it)
/* Compute the required width if needed. */
if (!it->lnum_width)
{
- if (NATNUMP (Vdisplay_line_number_width))
- it->lnum_width = XFASTINT (Vdisplay_line_number_width);
+ if (NATNUMP (Vdisplay_line_numbers_width))
+ it->lnum_width = XFASTINT (Vdisplay_line_numbers_width);
/* Max line number to be displayed cannot be more than the one
corresponding to the last row of the desired matrix. */
@@ -32686,35 +32686,38 @@ To add a prefix to continuation lines, use
`wrap-prefix'. */);
DEFVAR_LISP ("display-line-numbers", Vdisplay_line_numbers,
doc: /* Non-nil means display line numbers.
-If the value is t, display absolute line numbers starting at the
-beginning of the current narrowing, or at buffer beginning.
-If the value is `relative', display line numbers relative to the
-line showing point.
-The value `visual' countse lative screen lines rather than
-physical line: 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.
+If the value is t, display the absolute number of each line of a buffer
+shown in a window. Absolute line numbers count from the beginning of
+the current narrowing, or from buffer beginning. If the value is
+`relative', display for each line not containing the window's point its
+relative number instead, i.e. the number of the line relative to the
+line showing the window's point.
+
+In either case, line numbers are displayed at the beginning of each
+non-continuation line that displays buffer text, i.e. after each newline
+character that comes from the buffer. The value `visual' is like
+`relative' but counts screen lines instead of buffer lines. In practice
+this means that continuation lines count as well when calculating the
+relative number of a line.
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. */);
+buffer 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);
DEFSYM (Qrelative, "relative");
DEFSYM (Qvisual, "visual");
- DEFVAR_LISP ("display-line-number-width", Vdisplay_line_number_width,
+ DEFVAR_LISP ("display-line-numbers-width", Vdisplay_line_numbers_width,
doc: /* Minimum width of space reserved for line number display.
A positive number means reserve that many columns for line numbers,
even if the actual number needs less space.
The default value of nil means compute the space dynamically.
Any other value is treated as nil. */);
- Vdisplay_line_number_width = Qnil;
- DEFSYM (Qdisplay_line_number_width, "display-line-number-width");
- Fmake_variable_buffer_local (Qdisplay_line_number_width);
+ Vdisplay_line_numbers_width = Qnil;
+ DEFSYM (Qdisplay_line_numbers_width, "display-line-number-width");
+ Fmake_variable_buffer_local (Qdisplay_line_numbers_width);
DEFVAR_LISP ("display-line-numbers-current-absolute",
Vdisplay_line_numbers_current_absolute,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 01a98e9: Minor tweaks of new line number display variables,
Martin Rudalics <=