GNU bug report logs - #78916
31.0.50; C-g fails to exit loop

Previous Next

Package: emacs;

Reported by: Mike Kupfer <kupfer <at> rawbw.com>

Date: Fri, 27 Jun 2025 21:37:02 UTC

Severity: normal

Found in version 31.0.50

Full log


Message #74 received at 78916 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 78916 <at> debbugs.gnu.org, kupfer <at> rawbw.com
Subject: Re: bug#78916: 31.0.50; C-g fails to exit loop
Date: Thu, 03 Jul 2025 19:01:39 +0300
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: 78916 <at> debbugs.gnu.org,  kupfer <at> rawbw.com
> Date: Thu, 03 Jul 2025 10:48:51 -0400
> 
> > I agree that calling keyboard-quit is better.
> 
> So, I suggest the patch below.

Thanks.

> diff --git a/lisp/subr.el b/lisp/subr.el
> index 69f6e4dbab8..0a1d676445b 100644
> --- a/lisp/subr.el
> +++ b/lisp/subr.el
> @@ -4047,14 +4047,19 @@ y-or-n-p
>               ((memq answer '(skip act)) nil)
>               ((eq answer 'recenter)
>                (recenter) t)
> +             ;; Explicitly handle the other non-commands, to avoid
> +             ;; conflicts with possible commands of the same name.
> +             ((memq answer '( act-and-show act-and-exit exit edit
> +                              edit-replacement edit-replacement-exact-case
> +                              delete-and-edit automatic backup
> +                              undo undo-all help))
> +              t)
>               ((eq answer 'scroll-up)
>                (ignore-errors (scroll-up-command)) t)
>               ((eq answer 'scroll-down)
>                (ignore-errors (scroll-down-command)) t)
> -             ((eq answer 'scroll-other-window)
> -              (ignore-errors (scroll-other-window)) t)
> -             ((eq answer 'scroll-other-window-down)
> -              (ignore-errors (scroll-other-window-down)) t)
> +             ((functionp answer)
> +              (call-interactively answer) t)

Why not 'commandp'?




This bug report was last modified 25 days ago.

Previous Next


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