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

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

bug#57804: An infinite loop in a `fontify-region' function causes Emacs


From: Lars Ingebrigtsen
Subject: bug#57804: An infinite loop in a `fontify-region' function causes Emacs to hang indefinitely
Date: Wed, 14 Sep 2022 19:52:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

dick <dick.r.chiang@gmail.com> writes:

> jit-lock callbacks enjoy special status in that they're invoked
> out-of-band in redisplay C code. That's probably why they're not
> interruptible from the interpreter loop.

If I remember correctly, the problem isn't really that `C-g' isn't able
to break, but that we then call the redisplay immediately again, which
then calls the font-locking code.

Let's see...  yes, with this slightly modified version of Paul's code,
after hitting `C-g' eight times, I get a redisplay finally and it says
"Called 8 times".

So I think there's scope for us to do something practical here with this
annoying problem.  It's hard enough to develop font locking code without
Emacs suddenly (and unbreakably) hanging on you when you've typed in
some buggy code.

Attachment: font-lock-hangs.el
Description: application/emacs-lisp


reply via email to

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