diff options
Diffstat (limited to 'lisp/subr.el')
| -rw-r--r-- | lisp/subr.el | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 45cfb56bdc1..9f4e35fcbe0 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -2066,24 +2066,24 @@ If optional argument INHIBIT-KEYBOARD-QUIT is non-nil, ignore | |||
| 2066 | keyboard-quit events while waiting for a valid input." | 2066 | keyboard-quit events while waiting for a valid input." |
| 2067 | (unless (consp chars) | 2067 | (unless (consp chars) |
| 2068 | (error "Called `read-char-choice' without valid char choices")) | 2068 | (error "Called `read-char-choice' without valid char choices")) |
| 2069 | (let ((cursor-in-echo-area t) | 2069 | (let (char done) |
| 2070 | (executing-kbd-macro executing-kbd-macro) | 2070 | (let ((cursor-in-echo-area t) |
| 2071 | char done) | 2071 | (executing-kbd-macro executing-kbd-macro)) |
| 2072 | (while (not done) | 2072 | (while (not done) |
| 2073 | (unless (get-text-property 0 'face prompt) | 2073 | (unless (get-text-property 0 'face prompt) |
| 2074 | (setq prompt (propertize prompt 'face 'minibuffer-prompt))) | 2074 | (setq prompt (propertize prompt 'face 'minibuffer-prompt))) |
| 2075 | (setq char (let ((inhibit-quit inhibit-keyboard-quit)) | 2075 | (setq char (let ((inhibit-quit inhibit-keyboard-quit)) |
| 2076 | (read-key prompt))) | 2076 | (read-key prompt))) |
| 2077 | (cond | 2077 | (cond |
| 2078 | ((not (numberp char))) | 2078 | ((not (numberp char))) |
| 2079 | ((memq char chars) | 2079 | ((memq char chars) |
| 2080 | (setq done t)) | 2080 | (setq done t)) |
| 2081 | ((and executing-kbd-macro (= char -1)) | 2081 | ((and executing-kbd-macro (= char -1)) |
| 2082 | ;; read-event returns -1 if we are in a kbd macro and | 2082 | ;; read-event returns -1 if we are in a kbd macro and |
| 2083 | ;; there are no more events in the macro. Attempt to | 2083 | ;; there are no more events in the macro. Attempt to |
| 2084 | ;; get an event interactively. | 2084 | ;; get an event interactively. |
| 2085 | (setq executing-kbd-macro nil)))) | 2085 | (setq executing-kbd-macro nil))))) |
| 2086 | ;; Display the question with the answer. | 2086 | ;; Display the question with the answer. But without cursor-in-echo-area. |
| 2087 | (message "%s%s" prompt (char-to-string char)) | 2087 | (message "%s%s" prompt (char-to-string char)) |
| 2088 | char)) | 2088 | char)) |
| 2089 | 2089 | ||