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

From: Ihor Radchenko <[email-masked]>
Date: Mon, 15 Aug 2022 20:08:12 +0800

Dmitry Gutov <[email-masked]> writes:

> On 15.08.2022 06:10, Ihor Radchenko wrote:
>> The fact that MMM-mode is relying on narrowing is a bug in MMM-mode.
>> Polymode (an alternative to MMM-mode) is using a different approach.
>
> Does it really?
>
>  From what I see, Polymode does use narrowing: 
> https://github.com/polymode/polymode/search?q=narrow&type=code

> But it also contains provisions for modes whose syntax highlighting 
> cannot function with it. With different tradeoffs.

AFAIK, it allows running commands across multiple chunks of the same
foreign mode.

In any case, do not take my word on this. I have been studying MMM-mode
and polymode years back.

However, I do insist on my statement that expecting major-mode to not
widen is a bug. There are valid cases when a major mode needs to examine
the whole buffer.

-- 
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