[Top][All Lists]

[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: Alan Mackenzie
Subject: Re: master 7362554: Widen around c-font-lock-fontify-region. This fixes bug #38049.
Date: Mon, 11 Nov 2019 20:34:45 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

Hello, Dmitry.

On Mon, Nov 11, 2019 at 18:52:34 +0200, Dmitry Gutov wrote:
> On 09.11.2019 16:40, Alan Mackenzie wrote:
> > +    (widen)

> Could you try and honor font-lock-dont-widen here?

Difficult.  In CC Mode it is sometimes necessary to enlarge a font lock
region so as to get the context needed to parse some element of the
buffer.  This was what gave rise to the bug.

In all of Emacs, there's just one use of font-lock-dont-widen, in
rmail.el, and that is almost certainly for a different reason than your
use of it (which is, I believe, having several major modes in a single

Could you, perhaps, suggest some alternative to using widen in
c-font-lock-fontify-region?  Some way which would still work for CC Mode
(including the just fixed bug), but wouldn't adversely affect the
several major mode code you're maintaining?  Would it be possible to
widen "a bit" rather than widening to the whole buffer?  If so, how
would I determine the bit to widen to?

Alan Mackenzie (Nuremberg, Germany).

reply via email to

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