From: Juanma Barranquero Date: Mon, 31 May 2010 14:13:41 +0000 (-0400) Subject: Fix for momentary-string-display (Bug#6238). X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~164 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fe40dc63a6997a2dfb05e67efe21012247361f60;p=emacs.git Fix for momentary-string-display (Bug#6238). * lisp/subr.el (momentary-string-display): Just use read-event to read the exit event (Bug#6238). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0d0eae76851..5065ff98f36 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-05-31 Juanma Barranquero + + * subr.el (momentary-string-display): Just use read-event to read + the exit event (Bug#6238). + 2010-05-30 Eli Zaretskii * 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." (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))))