emacs-diffs
[Top][All Lists]
Advanced

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

master 8b44740: Fix arg-out-of-range errors in 'line-number-at-pos'


From: Eli Zaretskii
Subject: master 8b44740: Fix arg-out-of-range errors in 'line-number-at-pos'
Date: Thu, 20 May 2021 05:02:40 -0400 (EDT)

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

    Fix arg-out-of-range errors in 'line-number-at-pos'
    
    * src/fns.c (Fline_number_at_pos): Pass character position to
    args_out_of_range.  Suggested by Andreas Schwab
    <schwab@linux-m68k.org>.  Call args_out_of_range_3 to show both
    ends of the accessible portion.
---
 src/fns.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/fns.c b/src/fns.c
index e244268..40ade57 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -5919,7 +5919,7 @@ from the absolute start of the buffer, disregarding the 
narrowing.  */)
 
   /* 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));
+    args_out_of_range_3 (make_int (pos), make_int (BEGV), make_int (ZV));
 
   return make_int (count_lines (start, CHAR_TO_BYTE (pos)) + 1);
 }



reply via email to

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