Subject: Re: bug#35708: [27.0.50]: thingatpt.el, thing-at-point-looking-at redundant

From: [email-masked]
Date: Mon, 13 May 2019 15:25:38 -0400

Andreas Röhler <[email-masked]> writes:

> Thought at something like below, which should pass the test:
>
> (defun ar-thing-at-point-looking-at (regexp)
>   "Return t if regexp matches at or before point, nil otherwise."
>   (save-excursion
>       (while (not (or (looking-at regexp)(bolp)))
>       (forward-char -1))
>       (looking-at regexp)))

I think it's an optimization to use re-search-backward instead of moving
on character at a time and calling looking-at in lisp.