* Richard Stallman (2005-04-14) writes:

>     But I see your point and I'll check if forcing the whole buffer to be
>     fontified before folding leads to bearable execution times.
>
> If it is too slow, here's another possible idea: explicitly handle
> precisely and only the part of fontification that is needed for the
> other features to work.  That might be substantially faster.

Hm, I don't see an easy way to determine such a subset.  A possibility
could be to call `font-lock-fontify-region' only on the regions to be
folded.  But this may lead to wrong results in case there are
constructs enclosing such regions which would influence fontification.

I already commited a patch to AUCTeX's CVS.  The function responsible
for folding a buffer now calls `jit-lock-fontify-now' in case
jit-lock-mode is active and the function is available.  In the tests I
did, the increase of execution time for folding a buffer was barely
noticeable.  In case people will have problems with it, there is a
switch to inhibit forced fontification.

Thanks for your suggestions.

-- 
Ralf


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to