1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-03 08:30:09 +00:00

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)
This commit is contained in:
Eli Zaretskii 2017-10-17 19:17:22 +03:00
parent 5b6e59cfdb
commit 2e1b3522b8
2 changed files with 5 additions and 3 deletions

View File

@ -2053,8 +2053,9 @@ This function returns the width used for displaying the line numbers
in the selected window. Optional argument @var{pixelwise}, if
non-@code{nil}, means return the value in pixels; otherwise the value
is returned in column units of the font defined for the
@code{line-number} face. If line numbers are not displayed in the
selected window, the value is zero. Use @code{with-selected-window}
@code{line-number} 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

View File

@ -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;