GNU bug report logs - #78737
sit-for behavior changes when byte-compiled

Previous Next

Package: emacs;

Reported by: Daniel Colascione <dancol <at> dancol.org>

Date: Mon, 9 Jun 2025 20:50:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Pip Cet <pipcet <at> protonmail.com>
Cc: 78737 <at> debbugs.gnu.org, dancol <at> dancol.org, monnier <at> iro.umontreal.ca
Subject: bug#78737: sit-for behavior changes when byte-compiled
Date: Sat, 14 Jun 2025 10:16:15 +0300
> Date: Fri, 13 Jun 2025 18:25:13 +0000
> From: Pip Cet <pipcet <at> protonmail.com>
> Cc: Eli Zaretskii <eliz <at> gnu.org>, dancol <at> dancol.org, 78737 <at> debbugs.gnu.org
> 
> "Stefan Monnier" <monnier <at> 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;

That's not "emergency quit", that's part of "emergency exit".  A
different, though related, feature.

> 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.

It isn't a bug, because emergency exit happens when the count is 2.

There's a reason why I suggested to leave the emergency exit feature
alone for now.  Mixing it with this discussion just muddies the waters
and adds to confusion and misunderstandings.




This bug report was last modified 4 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.