emacs-diffs
[Top][All Lists]
Advanced

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

master d68f2b8: ; * src/fns.c (Fline_number_at_pos): Fix doc string and


From: Eli Zaretskii
Subject: master d68f2b8: ; * src/fns.c (Fline_number_at_pos): Fix doc string and comments.
Date: Thu, 20 May 2021 02:56:16 -0400 (EDT)

branch: master
commit d68f2b8681f8eeb6bbf1b4476a88f00b2962179e
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    ; * src/fns.c (Fline_number_at_pos): Fix doc string and comments.
---
 src/fns.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/fns.c b/src/fns.c
index 41429c8..e244268 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -5892,12 +5892,14 @@ in OBJECT.  */)
 
 DEFUN ("line-number-at-pos", Fline_number_at_pos,
        Sline_number_at_pos, 0, 2, 0,
-       doc: /* Return the line number at POSITION.
-If POSITION is nil, use the current buffer location.
-
-If the buffer is narrowed, the position returned is the position in the
-visible part of the buffer.  If ABSOLUTE is non-nil, count the lines
-from the absolute start of the buffer.  */)
+       doc: /* Return the line number at POSITION in the current buffer.
+If POSITION is nil or omitted, it defaults to point's position in the
+current buffer.
+
+If the buffer is narrowed, the return value by default counts the lines
+from the beginning of the accessible portion of the buffer.  But if the
+second optional argument ABSOLUTE is non-nil, the value counts the lines
+from the absolute start of the buffer, disregarding the narrowing.  */)
   (register Lisp_Object position, Lisp_Object absolute)
 {
   ptrdiff_t pos, start = BEGV_BYTE;
@@ -5915,7 +5917,7 @@ from the absolute start of the buffer.  */)
   if (!NILP (absolute))
     start = BEG_BYTE;
 
-  /* Check that POSITION is n the visible range of the buffer. */
+  /* Check that POSITION is in the accessible range of the buffer. */
   if (pos < BEGV || pos > ZV)
     args_out_of_range (make_int (start), make_int (ZV));
 



reply via email to

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