Sébastien Miquel writes: > I've looked at the history of this code, and some earlier comment > indicated that limit was ignored on purpose.
Thanks for digging. LIMIT was dropped from the re-search-forward call in 80268c0e0 (Fix fontification of LaTeX environments, 2019-01-01), with the addition of the now-removed comment you mention. The related thread is https://orgmode.org/list/CAELgYhdcW1XnR7BTmos6vAF_YPJ4Wdp=3feahbeyfea4b2n...@mail.gmail.com/T/#u I'm not sure about that change, but either way I think it's a good reason to stick with your proposed approach. Pushed (36622362d). Thanks.