help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: `looking-back' strange warning


From: Andreas Röhler
Subject: Re: `looking-back' strange warning
Date: Thu, 01 Oct 2015 10:46:42 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0


Am 01.10.2015 um 10:20 schrieb Tassilo Horn:
Andreas Röhler <andreas.roehler@easy-emacs.de> writes:

Docu bug?
It's a feature: calling `looking-back' without LIMIT is slow, don't do that.
Hmm, would volontier to make that fast instead - if write-permission
is given :)
Looking at the code, I'd say `looking-back' is only slow if GREEDY is t
in which case the start of the match may be before LIMIT anyhow.  So I
don't see how providing a LIMIT would help too much, or is
`re-search-backward' already slow without LIMIT?

AFAIK thats it.

Also "greedy" seems not to work at all:

(defun foo3 ())

(progn (re-search-backward "o+" nil t 3)
       (message "%s" (match-beginning 0)))

The first "o" is reported as match-beginning.




reply via email to

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