From: Tom Tromey <tom@tromey.com>
To: Anders Lindgren <andlind@gmail.com>
Cc: 41441@debbugs.gnu.org
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 [thread overview]
Message-ID: <87pnasro4o.fsf@tromey.com> (raw)
In-Reply-To: <CABr8ebZWHZAFDyVfnHw6DSAQ9h3QSBaJZAW8AgknMwHPY-T-KQ@mail.gmail.com> (Anders Lindgren's message of "Thu, 21 May 2020 22:14:00 +0200")
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
next prev parent reply other threads:[~2020-05-25 16:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-21 20:14 bug#41441: 26.3; mhtml misbehaving font-lock extend region can cause Emacs to hang Anders Lindgren
2020-05-25 16:11 ` Tom Tromey [this message]
2020-05-27 20:40 ` Anders Lindgren
2020-05-28 16:13 ` Tom Tromey
2020-05-28 18:40 ` Dmitry Gutov
2020-05-28 19:14 ` Tom Tromey
2020-05-28 19:31 ` Anders Lindgren
2020-05-28 19:50 ` Dmitry Gutov
2020-05-31 16:08 ` Tom Tromey
2020-05-31 17:46 ` Dmitry Gutov
2020-05-27 21:32 ` Dmitry Gutov
2020-05-28 16:14 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pnasro4o.fsf@tromey.com \
--to=tom@tromey.com \
--cc=41441@debbugs.gnu.org \
--cc=andlind@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).