emacs-diffs
[Top][All Lists]
Advanced

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

master 5461808: Allow Fline_number_at_pos being called with a marker


From: Lars Ingebrigtsen
Subject: master 5461808: Allow Fline_number_at_pos being called with a marker
Date: Sun, 7 Feb 2021 10:42:33 -0500 (EST)

branch: master
commit 5461808c40ea5baeade203c0a4cc8200855eb00c
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Allow Fline_number_at_pos being called with a marker
    
    * src/fns.c (Fline_number_at_pos): Also allow being called with a
    marker (since the Lisp function allowed that).
---
 src/fns.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/fns.c b/src/fns.c
index d27f632..02743c6 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -5771,7 +5771,9 @@ from the absolute start of the buffer.  */)
 {
   ptrdiff_t pos, start = BEGV;
 
-  if (NILP (position))
+  if (MARKERP (position))
+    pos = marker_position (position);
+  else if (NILP (position))
     pos = PT;
   else
     {



reply via email to

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