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

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

bug#78737: sit-for behavior changes when byte-compiled


From: Daniel Colascione
Subject: bug#78737: sit-for behavior changes when byte-compiled
Date: Fri, 13 Jun 2025 14:45:26 -0400
User-agent: K-9 Mail for Android

On June 13, 2025 2:25:13 PM EDT, Pip Cet <pipcet@protonmail.com> wrote:
>"Stefan Monnier" <monnier@iro.umontreal.ca> writes:
>
>>> What is a "normal quit"?
>>
>> A single C-g.
>>
>>> What is "emergency quit"?
>>
>> Something like `C-g C-g C-g`, tho we don't have that implemented,
>> currently, AFAIK.
>
>It's implemented.  See handle_interrupt in keyboard.c:
>
>      /* Request quit when it's safe.  */
>      int count = NILP (Vquit_flag) ? 1 : force_quit_count + 1;
>      force_quit_count = count;
>      if (count == 3)
>       Vinhibit_quit = Qnil;
>      Vquit_flag = Qt;
>
>The "emergency" part is clearing the inhibit-quit flag when
>force_quit_count reaches 3.  The bug is that it should be >= 3, and the
>questionable design feature is that we should reset the counter if
>Vquit_flag and Vinhibit_quit are both nil, not just based on Vquit_flag.
>
>However, there's also the rest of handle_interrupt, which applies to
>terminal sessions and takes them through an interactive text adventure
>which never clears Vinhibit_quit.

Yes. We need something like the force quit code you posted in spirit, but I 
don't think that's the right implementation because it's too easy to 
prematurely clear the quit flag.





reply via email to

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