changeset 108835:2f74da21b147

Fix for momentary-string-display (Bug#6238). * lisp/subr.el (momentary-string-display): Just use read-event to read the exit event (Bug#6238).
author Chong Yidong <cyd@stupidchicken.com>
date Mon, 31 May 2010 10:13:41 -0400
parents 91c7e7b1d29a
children b29291853540
files lisp/ChangeLog lisp/subr.el
diffstat 2 files changed, 10 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun May 30 22:47:34 2010 +0300
+++ b/lisp/ChangeLog	Mon May 31 10:13:41 2010 -0400
@@ -1,3 +1,8 @@
+2010-05-31  Juanma Barranquero  <lekktu@gmail.com>
+
+	* subr.el (momentary-string-display): Just use read-event to read
+	the exit event (Bug#6238).
+
 2010-05-30  Eli Zaretskii  <eliz@gnu.org>
 
 	* international/mule.el (define-coding-system): Doc fix (bug#6313).
--- a/lisp/subr.el	Sun May 30 22:47:34 2010 +0300
+++ b/lisp/subr.el	Mon May 31 10:13:41 2010 -0400
@@ -2204,22 +2204,11 @@
                 (recenter (/ (window-height) 2))))
           (message (or message "Type %s to continue editing.")
                    (single-key-description exit-char))
-          (let (char)
-            (if (integerp exit-char)
-                (condition-case nil
-                    (progn
-                      (setq char (read-char))
-                      (or (eq char exit-char)
-                          (setq unread-command-events (list char))))
-                  (error
-                   ;; `exit-char' is a character, hence it differs
-                   ;; from char, which is an event.
-                   (setq unread-command-events (list char))))
-              ;; `exit-char' can be an event, or an event description list.
-              (setq char (read-event))
-              (or (eq char exit-char)
-                  (eq char (event-convert-list exit-char))
-                  (setq unread-command-events (list char))))))
+	  (let ((event (read-event)))
+	    ;; `exit-char' can be an event, or an event description list.
+	    (or (eq event exit-char)
+		(eq event (event-convert-list exit-char))
+		(setq unread-command-events (list event)))))
       (delete-overlay ol))))