[Top][All Lists]

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

Re: looking-back

From: Richard Stallman
Subject: Re: looking-back
Date: Wed, 18 Jun 2003 00:53:11 -0400

    By the way, the only fix I know for the main problem is to do:

      (defun looking-back (regexp &optional limit)
        "Return non-nil if text before point matches REGEXP.
      Contrary to `looking-at', it will return the shortest match and it is
      typically orders of magnitude slower."
          (re-search-backward (concat "\\(?:" regexp "\\)\\=") limit t)))

    This is also the only use I know of for the \= regexp operator.

Would you please install this?  Note that the warning is
too strong--it should instead say you need to specify a close LIMIT
to get reasonable speed.

reply via email to

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