Subject: Re: bug#56682: Fix the long lines font locking related slowdowns

From: Ihor Radchenko <[email-masked]>
Date: Mon, 15 Aug 2022 09:23:21 +0800

Dmitry Gutov <[email-masked]> writes:

>> The problem is (again) that what you would like does not provide any 
>> protection against modes which use widen inside their fontification 
>> routines.
>
> Do you have examples of such modes?
>
> Calling 'widen' inside font-lock-keywords is a bug, and the bugs should 
> be fixed at the source.

widen inside save-restriction is likely used by Org mode (or will be).
This is needed by Org parser to determine the syntax element at point.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92