From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#63722: 29.0.91; (elisp) Skip to end #@00 does not work Date: Thu, 25 May 2023 21:44:28 +0300 Message-ID: <83y1lcl08j.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35729"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63722@debbugs.gnu.org To: richard newton , Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 25 20:45:35 2023 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 1q2Fxu-00099O-GQ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 May 2023 20:45:34 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q2FxW-0007U8-Od; Thu, 25 May 2023 14:45:10 -0400 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 1q2FxQ-0007Ta-5R for bug-gnu-emacs@gnu.org; Thu, 25 May 2023 14:45:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q2FxP-0005Tp-PA for bug-gnu-emacs@gnu.org; Thu, 25 May 2023 14:45:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q2FxO-0000YO-FY for bug-gnu-emacs@gnu.org; Thu, 25 May 2023 14:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 May 2023 18:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63722 X-GNU-PR-Package: emacs Original-Received: via spool by 63722-submit@debbugs.gnu.org id=B63722.16850402492034 (code B ref 63722); Thu, 25 May 2023 18:45:02 +0000 Original-Received: (at 63722) by debbugs.gnu.org; 25 May 2023 18:44:09 +0000 Original-Received: from localhost ([127.0.0.1]:48142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2FwX-0000Wj-Ba for submit@debbugs.gnu.org; Thu, 25 May 2023 14:44:09 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2FwV-0000WQ-Rx for 63722@debbugs.gnu.org; Thu, 25 May 2023 14:44:08 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q2FwQ-0005OB-8F; Thu, 25 May 2023 14:44:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=TEm4OJJlhPjfhho+lt6MLTlLgVGhLy5YITxKlpgr0Oo=; b=qbYNHkJrJTesZlknl2fc 6OP9BmlnyVTj6uLDpiqx1Jtqj1K2uTskrp+/QVo9hM/RwM/CtXFbxwOWnM/WXfqqrZ4aUxgB+d58s zo8jspOPVP6hZgqgZhODJjfScNJZkPA+Nr+jyqpAHIQhRtvcVBqoN79PkZjgMS7Wu3GLby1P1fw8I Mo4/NRegWSk86w07RflQwY7y06iYNSi0IQwWE6hiQRUU9eXZZeg1InzfyhtoKHYj1LrYv87PXfNF0 UMLuOdwIxFewrS2Kr8rDqqivq3iaW1tUGlWxFYeFV6Y+e1721Dtea8JC5nTdB3A3JpJOU9GKfaoJL +OU9mJ+9NObs9Q==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q2FwN-00009i-9W; Thu, 25 May 2023 14:44:00 -0400 In-Reply-To: (message from richard newton on Thu, 25 May 2023 16:19:42 +0200) 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:262388 Archived-At: > From: richard newton > Date: Thu, 25 May 2023 16:19:42 +0200 > > With emacs 29.0.91 pretest, the "skip to end" syntax #@00 no longer seems to work. For example, > with the three lines below in a buffer (eval-buffer) gives the error - End of file during parsing. With > previous emacs versions it did not complain. > > (setq testStr "zz") > #@00 > should be ignored Thanks. Mattias, this is due to commit b903507b36, which fixed bug#55676. It introduced a subtle change in the behavior of read0 in this case. Does the below look like the correct way of fixing this regression? diff --git a/src/lread.c b/src/lread.c index 342d367..6ee2829 100644 --- a/src/lread.c +++ b/src/lread.c @@ -3400,8 +3400,9 @@ read_bool_vector (Lisp_Object readcharfun) } /* Skip (and optionally remember) a lazily-loaded string - preceded by "#@". */ -static void + preceded by "#@". Return non-zero if we skip to EOB, + otherwise zero. */ +static bool skip_lazy_string (Lisp_Object readcharfun) { ptrdiff_t nskip = 0; @@ -3429,7 +3430,7 @@ skip_lazy_string (Lisp_Object readcharfun) { /* #@00 means "skip to end" */ skip_dyn_eof (readcharfun); - return; + return true; } } @@ -3476,6 +3477,8 @@ skip_lazy_string (Lisp_Object readcharfun) else /* Skip that many bytes. */ skip_dyn_bytes (readcharfun, nskip); + + return false; } /* Given a lazy-loaded string designator VAL, return the actual string. @@ -3933,7 +3936,8 @@ read0 (Lisp_Object readcharfun, bool locate_syms) /* #@NUMBER is used to skip NUMBER following bytes. That's used in .elc files to skip over doc strings and function definitions that can be loaded lazily. */ - skip_lazy_string (readcharfun); + if (skip_lazy_string (readcharfun)) + return unbind_to (base_pdl, Qnil); goto read_obj; case '$':