Subject: Re: bug#68272: [PATCH] Fix -1 leaking from C to lisp in 'read-event' etc.

From: Andreas Schwab <[email-masked]>
Date: Sat, 06 Jan 2024 10:15:26 +0100

On Jan 05 2024, Tim Ruffing wrote:

> From e73e08927792303013a8a9935656365f9f2299b6 Mon Sep 17 00:00:00 2001
> From: Tim Ruffing <[email-masked]>
> Date: Wed, 27 Dec 2023 14:32:09 +0100
> Subject: [PATCH 4/4] Remove workarounds for solved 'read-event' bug
>
> * lisp/subr.el (read-char-choice-with-read-key):
> * lisp/net/dbus.el (dbus-call-method):
> * lisp/calc/calc-prog.el:
> Remove workarounds for the bug fixed in the previous commit
> ac82baea1c41ec974ad49f2861ae6c06bda2b4ed, where 'read-event',
> 'read-char' and 'read-char-exclusively' could return wrongly -1.
> In the case of lisp/dbus.el, this reverts commit
> 7177393826c73c87ffe9b428f0e5edae244d7a98.
> ---
>  lisp/calc/calc-prog.el | 6 ------
>  lisp/net/dbus.el       | 6 +-----
>  lisp/subr.el           | 5 -----
>  3 files changed, 1 insertion(+), 16 deletions(-)
>
> diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el
> index 03210995eb3..177c179433d 100644
> --- a/lisp/calc/calc-prog.el
> +++ b/lisp/calc/calc-prog.el
> @@ -1230,8 +1230,6 @@ calc-kbd-skip-to-else-if
>  	ch)
>      (while (>= count 0)
>        (setq ch (read-char))
> -      (if (= ch -1)
> -	  (error "Unterminated Z[ in keyboard macro"))

Seems like calc actually wants to know when the kbd macro ends
prematurely, and removing the option to detect it is a regression.

-- 
Andreas Schwab, [email-masked]
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."