Subject: Re: bug#32257: 26.1; read-multiple-choice inf loops on mouse clicks

From: Eli Zaretskii <[email-masked]>
Date: Tue, 31 Jul 2018 19:04:07 +0300

> From: Noam Postavsky <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Mon, 30 Jul 2018 21:52:40 -0400
> 
> Another possibility is to use read-char-exclusive which only changes
> ERROR_NON_ASCII to 0.  The downside is that when there are mouse clicks
> it prints the events into the minibuffer, covering the prompt (but
> typing "?"  still works to restore the prompt).
> 
> --- i/lisp/emacs-lisp/rmc.el
> +++ w/lisp/emacs-lisp/rmc.el
> @@ -118,7 +118,7 @@ read-multiple-choice
>                              choices)))
>                    (condition-case nil
>                        (let ((cursor-in-echo-area t))
> -                        (read-char))
> +                        (read-char-exclusive))
>                      (error nil))))
>            (setq answer (lookup-key query-replace-map (vector tchar) t))
>            (setq tchar

Maybe this is the best compromise for emacs-026.  We could search for
a better (and bolder) solution on master.

Thanks.