Hi Najib and all, >>>>> Najib Idrissi-Kaïtouni writes: > Yes, this is much, much better with this patch. I don't experience any > noticeable slowdown anymore, whether in the test file or in my "real > world" file. Thanks! Thanks for confirmation. We'll fix the problem soon. To AUCTeX developers: I propose to install the attached fix. Any comments and suggestions are welcome. [Analysis] The backgrounds of the problem are the following two: 1. When there is a closing quote (or double prime) '' without matching opening quote `` before it, current `font-latex-extend-region-backwards-quotation' ends up to decrease `font-lock-beg' by 5000 (=default value of `font-latex-multiline-boundary') and returns t. 2. Previously, font-latex-extend-region-backwards-* functions were stored in `font-latex-extend-region-functions' and called just once per fontify operation. However, now they are in `font-lock-extend-region-functions' and can be called repeatedly in `font-lock-default-fontify-region', until all of them return nil. Therefore, when there is math expression like $f''(x)=x^{3}$, current f-l-e-r-b-q repeatedly decreases `font-lock-beg' so that the font lock region begins with BOB eventually. Thus every key stroke forces to re-fontify all the region from top of the buffer. This is the reason of the apparent slowdown in a large buffer. I think the behavior of the above item 1 is a bug. When f-l-e-r-b-q cannot find a matching opening quote, it should just give up to extend the region anymore. Regards, Ikumi Keita