diff options
| author | Richard M. Stallman | 1993-11-11 04:43:49 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-11-11 04:43:49 +0000 |
| commit | b26f0e4ea7c12f91b6f8ea569fcd20863f338dd9 (patch) | |
| tree | b1814bde37fe335bc3e38f057f69d3c0e2366a3a | |
| parent | 5c03767e4f546bd426d24e616016b346fe0b015b (diff) | |
| download | emacs-b26f0e4ea7c12f91b6f8ea569fcd20863f338dd9.tar.gz emacs-b26f0e4ea7c12f91b6f8ea569fcd20863f338dd9.zip | |
(map-y-or-n-p): Handle help-char values other than chars.
| -rw-r--r-- | lisp/map-ynp.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/map-ynp.el b/lisp/map-ynp.el index 0e3f219c23c..48dcbc35950 100644 --- a/lisp/map-ynp.el +++ b/lisp/map-ynp.el | |||
| @@ -121,12 +121,12 @@ Returns the number of actions taken." | |||
| 121 | (let ((cursor-in-echo-area (not no-cursor-in-echo-area))) | 121 | (let ((cursor-in-echo-area (not no-cursor-in-echo-area))) |
| 122 | (message "%s(y, n, !, ., q, %sor %s) " | 122 | (message "%s(y, n, !, ., q, %sor %s) " |
| 123 | prompt user-keys | 123 | prompt user-keys |
| 124 | (key-description (char-to-string help-char))) | 124 | (key-description (vector help-char))) |
| 125 | (setq char (read-event))) | 125 | (setq char (read-event))) |
| 126 | ;; Show the answer to the question. | 126 | ;; Show the answer to the question. |
| 127 | (message "%s(y, n, !, ., q, %sor %s) %s" | 127 | (message "%s(y, n, !, ., q, %sor %s) %s" |
| 128 | prompt user-keys | 128 | prompt user-keys |
| 129 | (key-description (char-to-string help-char)) | 129 | (key-description (vector help-char)) |
| 130 | (single-key-description char)) | 130 | (single-key-description char)) |
| 131 | (setq def (lookup-key map (vector char))) | 131 | (setq def (lookup-key map (vector char))) |
| 132 | (cond ((eq def 'exit) | 132 | (cond ((eq def 'exit) |
| @@ -205,7 +205,7 @@ the current %s and exit." | |||
| 205 | (t | 205 | (t |
| 206 | ;; Random char. | 206 | ;; Random char. |
| 207 | (message "Type %s for help." | 207 | (message "Type %s for help." |
| 208 | (key-description (char-to-string help-char))) | 208 | (key-description (vector help-char))) |
| 209 | (beep) | 209 | (beep) |
| 210 | (sit-for 1) | 210 | (sit-for 1) |
| 211 | (setq next (` (lambda () | 211 | (setq next (` (lambda () |