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: Thu, 28 May 2020 10:13:39 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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





reply via email to

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