[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#51101: 29.0.50; read-char-from-minibuffer accepts Enter even when no
From: |
Lars Ingebrigtsen |
Subject: |
bug#51101: 29.0.50; read-char-from-minibuffer accepts Enter even when not a choice. |
Date: |
Sun, 10 Oct 2021 22:06:56 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Juri Linkov <juri@linkov.net> writes:
> Maybe it works here because ask-user-about-supersession-threat
> is called from C with some flag that disables signaling 'quit'.
> But when trying to type RET after (y-or-n-p "Answer y or n: ")
> it terminates with the 'quit' signal. And indeed in the map
> used by y-or-n-p, RET is bound to 'exit':
>
> (define-key query-replace-map "\r" 'exit)
I must have tested this in the wrong version of Emacs -- I thought I was
testing y-or-n-p in Emacs 26.3 to see what it did there, but I must have
started a more recent version instead.
> I noticed the recent commit ec9f25bd356c7c81d94c78f11100b97d6d52ce97
> saying that RET means "yes" in y-or-n-p. But anyway since RET
> now does the same that read-char-choice-with-read-key does,
> so I removed mentions of RET from the doc string. Or should
> the fixed behavior be mentioned?
No, that's fine.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no