Arne J�rgensen <[EMAIL PROTECTED]> writes:
> Stefan Monnier <[EMAIL PROTECTED]> writes:
[...]
>> - use (re-search-forward "\\\\usepackage\\[\\(.*\\)\\]{inputenc}")
>> and once it matched, check if it's inside a comment. This should be
>> *much* faster because of how the regexp-engine works (basically,
>> it will backtrack much less). The search as it is coded now could very
>> well fail with "regexp stack overflow".
[...]
> Lute Kamstra <[EMAIL PROTECTED]> writes:
[...]
>> Another idea is to change the regexps and search only for
>> \inputencoding{...} and \usepackage[...]{inputenc} at the start of a
>> line. That's where they typically are. This will speed up the search
>> dramatically.
>
> That would probably be an ok compromise (between what is actually
> legal LaTeX and what is normally used). But the other approaches can
> do the trick I would prefer to avoid this.
You can avoid it by using Stefan's suggestion above. It is probably
faster than my idea, but a bit more work to implement.
Lute.
_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel