bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#41441: 26.3; mhtml misbehaving font-lock extend region can cause Ema


From: Tom Tromey
Subject: bug#41441: 26.3; mhtml misbehaving font-lock extend region can cause Emacs to hang
Date: Mon, 25 May 2020 10:11:03 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Anders> * Fix the problem in `mhtml--extend-font-lock-region`.

It's not entirely clear to me that (1) this is a bug, or (2) that it can
be changed.

My recollection is that mhtml mode has to shrink the region in some
cases, because we don't want font-locking to extend beyond the end of a
sub-mode.
           
For example consider things like

<script>some js here;</script><p>more html here</p>

Here, we want to font-lock the body of the script using one set of
rules, and the rest with another set.

Looking at mhtml--submode-fontify-region, though, I wonder if maybe
region extension isn't needed at all, since that function seems to
handle sub-mode region boundaries.  So I guess that is one
experiment that could be done.

Anders> One minor mode that, when enabled, would cause Emacs to hang
Anders> with the above buffer is
Anders> https://github.com/Lindydancer/char-font-lock (this package
Anders> highlights incorrect whitespace).

Maybe this mode could be changed instead.

Tom





reply via email to

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