From: Eli Zaretskii Date: Thu, 20 May 2021 06:55:28 +0000 (+0300) Subject: ; * src/fns.c (Fline_number_at_pos): Fix doc string and comments. X-Git-Tag: emacs-28.0.90~2389 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d68f2b8681f8eeb6bbf1b4476a88f00b2962179e;p=emacs.git ; * src/fns.c (Fline_number_at_pos): Fix doc string and comments. --- diff --git a/src/fns.c b/src/fns.c index 41429c8863d..e2442685732 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));