[Top][All Lists]

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

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

From: Andreas Röhler
Subject: bug#35708: [27.0.50]: thingatpt.el, thing-at-point-looking-at redundant
Date: Mon, 13 May 2019 20:31:54 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 13.05.19 14:41, Noam Postavsky wrote:
Andreas Röhler <address@hidden> writes:

as result of ‘thing-at-point-looking-at’ finally is delivered by
don't see any sense in calling ‘re-search-forward’ first.
The test added below fails if the re-search-forward in
thing-at-point-looking-at is commented out.  Does that tell you what the
"sense" is?

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."
      (while (not (or (looking-at regexp)(bolp)))
      (forward-char -1))
      (looking-at regexp)))

reply via email to

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