Subject: Re: bug#57804: An infinite loop in a `fontify-region' function causes Emacs to hang indefinitely

From: Eli Zaretskii <[email-masked]>
Date: Wed, 14 Sep 2022 20:51:43 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Wed, 14 Sep 2022 19:46:15 +0200
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > While testing my code? sure.  But after testing, no, the loops are
> > generally gone.
> 
> Of course.  This is a real problem while developing font locking methods
> (and usually not afterwards).

While testing, I usually run Emacs under a debugger, where I always
can interrupt any loop, including in font-lock.

I think it is also possible without a debugger -- if you bind
'sigusr2' to some useful function.