From: Lars Ingebrigtsen Date: Sun, 7 Feb 2021 15:42:25 +0000 (+0100) Subject: Allow Fline_number_at_pos being called with a marker X-Git-Tag: emacs-28.0.90~3885 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5461808c40ea5baeade203c0a4cc8200855eb00c;p=emacs.git 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). --- 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 {