diff options
| author | Stefan Monnier | 2011-03-21 12:42:16 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2011-03-21 12:42:16 -0400 |
| commit | cafdcef32d55cbb44389d7e322e7f973cbb72dfd (patch) | |
| tree | 7ee0c41ea8a589650ce6f4311fb10e61a63807b9 /lisp/subr.el | |
| parent | a08a25d7aaf251aa18f2ef747be53734bc55cae9 (diff) | |
| parent | 4e05e67e4cd0bc1b0a4ef3176a4d0d91c6b3738e (diff) | |
| download | emacs-cafdcef32d55cbb44389d7e322e7f973cbb72dfd.tar.gz emacs-cafdcef32d55cbb44389d7e322e7f973cbb72dfd.zip | |
Merge from trunk
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 | ||