From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.bugs Subject: bug#68272: [PATCH] Fix -1 leaking from C to lisp in 'read-event' etc. Date: Sat, 06 Jan 2024 10:15:26 +0100 Message-ID: <87cyueg6vl.fsf@linux-m68k.org> References: <46480759b6d89b5a4864e8ee1b986817366a56e5.camel@timruffing.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39886"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 68272@debbugs.gnu.org To: Tim Ruffing Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 06 10:16:11 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rM2mp-000AAh-Fi for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Jan 2024 10:16:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rM2md-0003uX-9X; Sat, 06 Jan 2024 04:15:59 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rM2mb-0003td-LK for bug-gnu-emacs@gnu.org; Sat, 06 Jan 2024 04:15:57 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rM2mb-0001Rl-A1 for bug-gnu-emacs@gnu.org; Sat, 06 Jan 2024 04:15:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rM2mg-0001BA-36 for bug-gnu-emacs@gnu.org; Sat, 06 Jan 2024 04:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Schwab Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Jan 2024 09:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68272 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 68272-submit@debbugs.gnu.org id=B68272.17045325372031 (code B ref 68272); Sat, 06 Jan 2024 09:16:02 +0000 Original-Received: (at 68272) by debbugs.gnu.org; 6 Jan 2024 09:15:37 +0000 Original-Received: from localhost ([127.0.0.1]:58578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rM2mH-0000W7-Cy for submit@debbugs.gnu.org; Sat, 06 Jan 2024 04:15:37 -0500 Original-Received: from mail-out.m-online.net ([212.18.0.9]:56011) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rM2mE-0000NH-FQ for 68272@debbugs.gnu.org; Sat, 06 Jan 2024 04:15:36 -0500 Original-Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4T6ZRg2hLdz1qsP5; Sat, 6 Jan 2024 10:15:27 +0100 (CET) Original-Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 4T6ZRg1Rwjz1qqlS; Sat, 6 Jan 2024 10:15:27 +0100 (CET) X-Virus-Scanned: amavis at mnet-online.de Original-Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavis, port 10024) with ESMTP id Hct6Wpj4GXAW; Sat, 6 Jan 2024 10:15:26 +0100 (CET) X-Auth-Info: wSDLGfb5kpzh1/cUjNIFVO9a4e9qwh91p/68mDN98Rl1JfO0cM01VHT7dpMDGo6w Original-Received: from tiger.home (aftr-62-216-202-146.dynamic.mnet-online.de [62.216.202.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sat, 6 Jan 2024 10:15:26 +0100 (CET) Original-Received: by tiger.home (Postfix, from userid 1000) id 28F192455C3; Sat, 6 Jan 2024 10:15:26 +0100 (CET) In-Reply-To: <46480759b6d89b5a4864e8ee1b986817366a56e5.camel@timruffing.de> (Tim Ruffing's message of "Fri, 05 Jan 2024 22:19:10 +0100") X-Yow: What I want to find out is -- do parrots know much about Astro-Turf? X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:277440 Archived-At: On Jan 05 2024, Tim Ruffing wrote: > From e73e08927792303013a8a9935656365f9f2299b6 Mon Sep 17 00:00:00 2001 > From: Tim Ruffing > 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, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."