From 5461808c40ea5baeade203c0a4cc8200855eb00c Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 7 Feb 2021 16:42:25 +0100 Subject: [PATCH] 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 d27f63222c4..02743c62a57 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 { -- 2.39.2