Subject: Re: bug#27454: C-S-g [keyboard-quit] doesn't work to get out of disabled command choice

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 21 Jul 2019 17:48:54 +0200

積丹尼 Dan Jacobson <[email-masked]> writes:

> Please make
>  C-S-g [keyboard-quit]
> work just like
>  C-g [keyboard-quit]
> to get out of
>  Please type y, n, ! or SPC (the space bar):
> in case one's CAPS LOCK key gets stuck, etc.
> Seen on
>  You have typed e, invoking disabled command gnus-summary-edit-article.

To reproduce:

emacs -Q
C-x n n

and then try using C-S-g to break out of it, and that doesn't work.

So I'm guessing that whatever does this translation normally doesn't
work in whatever disabled-command-function uses...

Oh, it's this:

       (while (progn (setq char (read-event))
		     (or (not (numberp char))
			 (not (memq (downcase char)
				    '(?! ?y ?n ?\s ?\C-g)))))
	 (ding)
	 (message "Please type y, n, ! or SPC (the space bar): "))))

Because normally C-S-g works the same as C-g (see below).  Should we
perhaps just add C-S-g to the events this function checks for?

---

C-g (translated from C-S-g) runs the command keyboard-quit (found in
global-map), which is an interactive compiled Lisp function in
‘simple.el’.

It is bound to C-g.

(keyboard-quit)

Signal a ‘quit’ condition.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no