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

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

Re: font-lock is broken


From: Stefan Monnier
Subject: Re: font-lock is broken
Date: Fri, 22 Jul 2005 15:57:52 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>     The most common such problem by far is when a regexp hits a pathological
>     exponential-matching behavior.  I wish we'd fix that one instead.

> It would be good to fix that, but how?  It is a consequence of the
> algorithm, and even recognizing these cases would seem to be a hard
> problem.

The problem is not just that the function doesn't terminate in a reasonable
amount of time, but that it can't be interrupted.

>     Also, they're only painful because of Emacs's lack of NMI.
> What is NMI?

Non-Maskable Interrupt.  I.e. like C-g but without paying attention to
things like inhibit-quit.

>       E.g. when C-g is pressed, record the time, and if a C-g
>     is pressed again 2 seconds later and the first hasn't been processed yet,
>     then ignore the inhibit-quit flag (i.e. set it back to nil).

> I don't understand the suggestion clearly.  What would it do if the
> second C-g is less than two seconds later?

Just like now: the second C-g is just ignored.

> What would it do if the second C-g is more than two seconds later?

By 2 seconds I meant "at least 2 seconds".

If two C-g are separated by 2 seconds or more and the first is not processed
by the time we see the second, then we can assume that Emacs is
non-responsive and that inhibit-quit should probably be ignored.


        Stefan




reply via email to

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