GNU bug report logs -
#78916
31.0.50; C-g fails to exit loop
Previous Next
Full log
View this message in rfc822 format
> 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.