diff options
| author | Lars Ingebrigtsen | 2020-10-13 04:59:11 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2020-10-13 04:59:11 +0200 |
| commit | b31e48d4efb030b59a9058796c2da53357c379a3 (patch) | |
| tree | 54e3c94e305cbea994d61dc7715e4c07c96f3cad | |
| parent | 94b870dfa38548c3bb4b5a471a3dbf5819646b44 (diff) | |
| download | emacs-b31e48d4efb030b59a9058796c2da53357c379a3.tar.gz 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).
| -rw-r--r-- | lisp/subr.el | 10 |
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." | |||
| 2622 | (unless (get-text-property 0 'face prompt) | 2622 | (unless (get-text-property 0 'face prompt) |
| 2623 | (setq prompt (propertize prompt 'face 'minibuffer-prompt))) | 2623 | (setq prompt (propertize prompt 'face 'minibuffer-prompt))) |
| 2624 | (setq char (let ((inhibit-quit inhibit-keyboard-quit)) | 2624 | (setq char (let ((inhibit-quit inhibit-keyboard-quit)) |
| 2625 | (read-key prompt))) | 2625 | (read-char-from-minibuffer |
| 2626 | prompt | ||
| 2627 | ;; If we have a dynamically bound `help-form' | ||
| 2628 | ;; here, then the `C-h' (i.e., `help-char') | ||
| 2629 | ;; character should output that instead of | ||
| 2630 | ;; being a command char. | ||
| 2631 | (if help-form | ||
| 2632 | (cons help-char chars) | ||
| 2633 | chars)))) | ||
| 2626 | (and show-help (buffer-live-p (get-buffer helpbuf)) | 2634 | (and show-help (buffer-live-p (get-buffer helpbuf)) |
| 2627 | (kill-buffer helpbuf)) | 2635 | (kill-buffer helpbuf)) |
| 2628 | (cond | 2636 | (cond |