]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid infloop in read-multiple-choice (Bug#32257)
authorNoam Postavsky <npostavs@gmail.com>
Wed, 22 May 2019 00:38:00 +0000 (20:38 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Sun, 26 May 2019 12:16:23 +0000 (08:16 -0400)
* lisp/emacs-lisp/rmc.el (read-multiple-choice): Use `read-event'
which won't get stuck (return the same event over and over again) for
non-character events, unlike `read-char'.

lisp/emacs-lisp/rmc.el

index 6d1adae9749097668e7ab5235f6a4a4b4e712198..47f3b8dc9cf2c80c6465e8e55a7702432e381332 100644 (file)
@@ -118,7 +118,7 @@ Usage example:
                             choices)))
                   (condition-case nil
                       (let ((cursor-in-echo-area t))
-                        (read-char))
+                        (read-event))
                     (error nil))))
           (setq answer (lookup-key query-replace-map (vector tchar) t))
           (setq tchar