]> git.eshelyaron.com Git - emacs.git/commitdiff
Allow Fline_number_at_pos being called with a marker
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 7 Feb 2021 15:42:25 +0000 (16:42 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 7 Feb 2021 15:42:25 +0000 (16:42 +0100)
* src/fns.c (Fline_number_at_pos): Also allow being called with a
marker (since the Lisp function allowed that).

src/fns.c

index d27f63222c4a49cfc85bb69b5235a8c2cdacbb01..02743c62a5755f61268dd258c4b9a8c0d07edec8 100644 (file)
--- 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
     {