From: Tom Tromey <tom@tromey.com>
To: Anders Lindgren <andlind@gmail.com>
Cc: 41441@debbugs.gnu.org, Tom Tromey <tom@tromey.com>
Subject: bug#41441: 26.3; mhtml misbehaving font-lock extend region can cause Emacs to hang
Date: Thu, 28 May 2020 10:13:39 -0600 [thread overview]
Message-ID: <87mu5sf364.fsf@tromey.com> (raw)
In-Reply-To: <CABr8ebaJxWtX16TL3-JUz6HqYftgima4O4UNXjaiTWDvE+H40w@mail.gmail.com> (Anders Lindgren's message of "Wed, 27 May 2020 22:40:55 +0200")
Anders> Hi!To me it's obviously a bug. First, the name of the
Anders> function contains "extend", not "change".
Yes, but the manual says:
You can enlarge (or even reduce) the region to refontify by setting
the following variable:
See (info "(elisp) Region to Refontify")
Anders> Without having a deep knowledge of this, I don't think this
Anders> do the correct thing when font-lock-beg is at the end of a line
Anders> (as it is when the line is empty). The problem is that the code
Anders> move forward one character (the newline) and then search
Anders> backward with line-beginning-position (i.e. the beginning of the
Anders> line following the original font-lock-beg) as limit, effectively
Anders> shrinking the region.
IIRC this weird thing was needed to correctly find the spot where the
property change really occurred, without having trouble when starting
exactly on the boundary.
I don't remember the test case. Not sure if the self-tests cover this;
maybe it's archived in a bug somewhere though.
Tom
next prev parent reply other threads:[~2020-05-28 16:13 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
2020-05-27 20:40 ` Anders Lindgren
2020-05-28 16:13 ` Tom Tromey [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mu5sf364.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.