1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-27 08:43:40 -07:00

Make read-char-choice less modal

* lisp/subr.el (read-char-choice): Use `read-char-from-minibuffer'
here (bug#42708) so that we're not as modal (and users can copy
the help buffer, if they should so want).
This commit is contained in:
Lars Ingebrigtsen 2020-10-13 04:59:11 +02:00
parent 94b870dfa3
commit b31e48d4ef

View file

@ -2622,7 +2622,15 @@ keyboard-quit events while waiting for a valid input."
(unless (get-text-property 0 'face prompt)
(setq prompt (propertize prompt 'face 'minibuffer-prompt)))
(setq char (let ((inhibit-quit inhibit-keyboard-quit))
(read-key prompt)))
(read-char-from-minibuffer
prompt
;; If we have a dynamically bound `help-form'
;; here, then the `C-h' (i.e., `help-char')
;; character should output that instead of
;; being a command char.
(if help-form
(cons help-char chars)
chars))))
(and show-help (buffer-live-p (get-buffer helpbuf))
(kill-buffer helpbuf))
(cond