Indeed the bug was hiding there all these years, until finally the
change from last February---namely, the "disallow '.' at the start"
part---brought it to light. It's a simple matter of orientation: just
-like the comments suggests, ~thing-at-point-looking-at~ would search
+like the comments suggest, ~thing-at-point-looking-at~ would search
forward from point, and then start searching backward. But since
Emacs doesn't really have a backward-regexp-matching capability, its
~re-search-backward~ works by /moving backward/ and /searching
(while (and (setq prev (point)
match (re-search-forward regexp end t))
(< (match-end 0) old))
+ (goto-char (match-beginning 0))
;; Avoid inflooping when `regexp' matches the empty string.
(unless (< prev (point)) (forward-char))))
(and match (<= (match-beginning 0) old (match-end 0)))))