emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 2e1b352: Improve documentation of 'line-number-di


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-26 2e1b352: Improve documentation of 'line-number-display-width'
Date: Tue, 17 Oct 2017 12:18:19 -0400 (EDT)

branch: emacs-26
commit 2e1b3522b8562f94a98fed07aeddb6b5ba0dbc6c
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Improve documentation of 'line-number-display-width'
    
    * doc/lispref/display.texi (Size of Displayed Text): Document the
    additional 2 columns used for line-number display.
    
    * src/indent.c (Fline_number_display_width): Doc fix.  (Bug#28248)
---
 doc/lispref/display.texi | 5 +++--
 src/indent.c             | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index afd09cf..fbdd810 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -2053,8 +2053,9 @@ This function returns the width used for displaying the 
line numbers
 in the selected window.  Optional argument @var{pixelwise}, if
 address@hidden, means return the value in pixels; otherwise the value
 is returned in column units of the font defined for the
address@hidden face.  If line numbers are not displayed in the
-selected window, the value is zero.  Use @code{with-selected-window}
address@hidden face, and doesn't include the 2 columns used to pad
+the numbers.  If line numbers are not displayed in the selected
+window, the value is zero.  Use @code{with-selected-window}
 (@pxref{Selecting Windows}) if you need this information about another
 window.
 @end defun
diff --git a/src/indent.c b/src/indent.c
index be86766..a3e9b5b 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -1993,7 +1993,8 @@ DEFUN ("line-number-display-width", 
Fline_number_display_width,
        doc: /* Return the width used for displaying line numbers in the 
selected window.
 If optional argument PIXELWISE is non-nil, return the width in pixels,
 otherwise return the width in columns of the face used to display
-line numbers, `line-number'.  */)
+line numbers, `line-number'.  Note that in the latter case, the value
+doesn't include the 2 columns used for padding the numbers.  */)
   (Lisp_Object pixelwise)
 {
   int width, pixel_width;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]