diff options
| author | Juanma Barranquero | 2010-05-31 10:13:41 -0400 |
|---|---|---|
| committer | Chong Yidong | 2010-05-31 10:13:41 -0400 |
| commit | fe40dc63a6997a2dfb05e67efe21012247361f60 (patch) | |
| tree | 76afe7f801032334098ab297cd3f2da3365c6c1b | |
| parent | 9e8014c63aac39d5ca9987366ca506ba4d2aaffe (diff) | |
| download | emacs-fe40dc63a6997a2dfb05e67efe21012247361f60.tar.gz emacs-fe40dc63a6997a2dfb05e67efe21012247361f60.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 0d0eae76851..5065ff98f36 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-30 Eli Zaretskii <eliz@gnu.org> | 6 | 2010-05-30 Eli Zaretskii <eliz@gnu.org> |
| 2 | 7 | ||
| 3 | * international/mule.el (define-coding-system): Doc fix (bug#6313). | 8 | * international/mule.el (define-coding-system): Doc fix (bug#6313). |
diff --git a/lisp/subr.el b/lisp/subr.el index beb6672a7e1..e7fbf31b2b7 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -2204,22 +2204,11 @@ If MESSAGE is nil, instructions to type EXIT-CHAR are displayed there." | |||
| 2204 | (recenter (/ (window-height) 2)))) | 2204 | (recenter (/ (window-height) 2)))) |
| 2205 | (message (or message "Type %s to continue editing.") | 2205 | (message (or message "Type %s to continue editing.") |
| 2206 | (single-key-description exit-char)) | 2206 | (single-key-description exit-char)) |
| 2207 | (let (char) | 2207 | (let ((event (read-event))) |
| 2208 | (if (integerp exit-char) | 2208 | ;; `exit-char' can be an event, or an event description list. |
| 2209 | (condition-case nil | 2209 | (or (eq event exit-char) |
| 2210 | (progn | 2210 | (eq event (event-convert-list exit-char)) |
| 2211 | (setq char (read-char)) | 2211 | (setq unread-command-events (list event))))) |
| 2212 | (or (eq char exit-char) | ||
| 2213 | (setq unread-command-events (list char)))) | ||
| 2214 | (error | ||
| 2215 | ;; `exit-char' is a character, hence it differs | ||
| 2216 | ;; from char, which is an event. | ||
| 2217 | (setq unread-command-events (list char)))) | ||
| 2218 | ;; `exit-char' can be an event, or an event description list. | ||
| 2219 | (setq char (read-event)) | ||
| 2220 | (or (eq char exit-char) | ||
| 2221 | (eq char (event-convert-list exit-char)) | ||
| 2222 | (setq unread-command-events (list char)))))) | ||
| 2223 | (delete-overlay ol)))) | 2212 | (delete-overlay ol)))) |
| 2224 | 2213 | ||
| 2225 | 2214 | ||