]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix for momentary-string-display (Bug#6238).
authorJuanma Barranquero <lekktu@gmail.com>
Mon, 31 May 2010 14:11:18 +0000 (10:11 -0400)
committerChong Yidong <cyd@stupidchicken.com>
Mon, 31 May 2010 14:11:18 +0000 (10:11 -0400)
* lisp/subr.el (momentary-string-display): Just use read-event to read
the exit event (Bug#6238).

lisp/ChangeLog
lisp/subr.el

index 34a494aa5f27c87d4fc11ec12a84938aadcd7cf9..f668922cb5cfd5dfc637c2ac030a209565b45926 100644 (file)
@@ -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-29  Chong Yidong  <cyd@stupidchicken.com>
 
        * ansi-color.el: Delete unused escape sequences (Bug#6085).
index e964a0ef5d4c2cf265ab9c6e95e4fad47a722826..59e00bfbeb291fe9347caf151568d10ea5ba6a65 100644 (file)
@@ -2207,22 +2207,11 @@ If MESSAGE is nil, instructions to type EXIT-CHAR are displayed there."
                 (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))))
 
 \f