summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2020-10-13 04:59:11 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2020-10-13 04:59:11 +0200
commitb31e48d4efb030b59a9058796c2da53357c379a3 (patch)
tree54e3c94e305cbea994d61dc7715e4c07c96f3cad /lisp
parent94b870dfa38548c3bb4b5a471a3dbf5819646b44 (diff)
downloademacs-b31e48d4efb030b59a9058796c2da53357c379a3.tar.gz
emacs-b31e48d4efb030b59a9058796c2da53357c379a3.tar.bz2
emacs-b31e48d4efb030b59a9058796c2da53357c379a3.zip
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).
Diffstat (limited to 'lisp')
-rw-r--r--lisp/subr.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 07cab5909d6..867c9f0bfbb 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -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