emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 7362554: Widen around c-font-lock-fontify-region. This fixes


From: Dmitry Gutov
Subject: Re: master 7362554: Widen around c-font-lock-fontify-region. This fixes bug #38049.
Date: Thu, 14 Nov 2019 16:35:14 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 14.11.2019 16:29, Eli Zaretskii wrote:
From: Dmitry Gutov <address@hidden>
Date: Thu, 14 Nov 2019 16:05:13 +0200
Cc: Alan Mackenzie <address@hidden>, address@hidden

The hope is that calling vertical-motion (or font-lock-ensure directly)
inside narrowing is a rare occasion

Why do we need to have such hopes?

For starters, because it's the current expectation of mmm-mode. :-)

That's selfish, I know. But the counter-examples are sufficiently rare.

The reality could be different,
and I'd like us to support those different conditions.  It doesn't
sound like it's much harder.

There are options, sure. But I think all of them will require explicit support from major modes. Like adding a new element to prog-indentation-context, which will be a function which either returns new narrowing bounds or does the narrowing itself. And then the major mode will have to make sure to use it everywhere.

This particular case is annoying because it seems to mean that the (widen) call in font-lock-default-fontify-buffer doesn't help, and a lot of font-lock-keywords matchers will need to call (widen) anyway.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]