diff options
| author | Juanma Barranquero | 2010-05-31 10:11:18 -0400 |
|---|---|---|
| committer | Chong Yidong | 2010-05-31 10:11:18 -0400 |
| commit | 450439d5b6c08f0001f6676a697f29d88f587b98 (patch) | |
| tree | b0c1eb2357a11d1288f4079988a04ee23057bf8f | |
| parent | a73f9c9dfdcf6be0ca39e87e6d98f1094158ff9f (diff) | |
| download | emacs-450439d5b6c08f0001f6676a697f29d88f587b98.tar.gz emacs-450439d5b6c08f0001f6676a697f29d88f587b98.zip | |
Fix for momentary-string-display (Bug#6238).
* lisp/subr.el (momentary-string-display): Just use read-event to read
the exit event (Bug#6238).
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/subr.el | 21 |
2 files changed, 10 insertions, 16 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 34a494aa5f2..f668922cb5c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-05-31 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * subr.el (momentary-string-display): Just use read-event to read | ||
| 4 | the exit event (Bug#6238). | ||
| 5 | |||
| 1 | 2010-05-29 Chong Yidong <cyd@stupidchicken.com> | 6 | 2010-05-29 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 7 | ||
| 3 | * ansi-color.el: Delete unused escape sequences (Bug#6085). | 8 | * ansi-color.el: Delete unused escape sequences (Bug#6085). |
diff --git a/lisp/subr.el b/lisp/subr.el index e964a0ef5d4..59e00bfbeb2 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -2207,22 +2207,11 @@ If MESSAGE is nil, instructions to type EXIT-CHAR are displayed there." | |||
| 2207 | (recenter (/ (window-height) 2)))) | 2207 | (recenter (/ (window-height) 2)))) |
| 2208 | (message (or message "Type %s to continue editing.") | 2208 | (message (or message "Type %s to continue editing.") |
| 2209 | (single-key-description exit-char)) | 2209 | (single-key-description exit-char)) |
| 2210 | (let (char) | 2210 | (let ((event (read-event))) |
| 2211 | (if (integerp exit-char) | 2211 | ;; `exit-char' can be an event, or an event description list. |
| 2212 | (condition-case nil | 2212 | (or (eq event exit-char) |
| 2213 | (progn | 2213 | (eq event (event-convert-list exit-char)) |
| 2214 | (setq char (read-char)) | 2214 | (setq unread-command-events (list event))))) |
| 2215 | (or (eq char exit-char) | ||
| 2216 | (setq unread-command-events (list char)))) | ||
| 2217 | (error | ||
| 2218 | ;; `exit-char' is a character, hence it differs | ||
| 2219 | ;; from char, which is an event. | ||
| 2220 | (setq unread-command-events (list char)))) | ||
| 2221 | ;; `exit-char' can be an event, or an event description list. | ||
| 2222 | (setq char (read-event)) | ||
| 2223 | (or (eq char exit-char) | ||
| 2224 | (eq char (event-convert-list exit-char)) | ||
| 2225 | (setq unread-command-events (list char)))))) | ||
| 2226 | (delete-overlay ol)))) | 2215 | (delete-overlay ol)))) |
| 2227 | 2216 | ||
| 2228 | 2217 | ||