Subject: bug#192: regexp does not work as documented

From: Stefan Monnier <[email-masked]>
Date: Tue, 06 May 2008 11:35:01 -0400

> You are right that there is a limit, but it is set to 200000:
> highlight-regexp is aliased to hi-lock-face-buffer, which asks for the
> arguments and calls hi-lock-set-pattern.  hi-lock-set-pattern does little
> more than applying a margin of 100000 and calling re-search-forward.

Actually, font-lock-fontified is most likely set to t, so
hi-lock-set-pattern doesn't call re-sarch-forward at all and only calls
font-lock-fontify-buffer instead.

>   - I originally observed the bug in po-mode (part of GNU gettext), in
>     a function po-find-span-of-entry which essentially only calls
>     re-search-backward and re-search-forward.

Please try and reproduce the problem there and send us a recipe.

        Stefan