From unknown Fri Aug 15 20:56:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67568: Emacs master: Bug in byte compiler when there's an unused parameter. Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: monnier@iro.umontreal.ca, bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Dec 2023 12:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67568 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 67568@debbugs.gnu.org Cc: Stefan Monnier X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: Stefan Monnier Received: via spool by submit@debbugs.gnu.org id=B.170143506131099 (code B ref -1); Fri, 01 Dec 2023 12:51:01 +0000 Received: (at submit) by debbugs.gnu.org; 1 Dec 2023 12:51:01 +0000 Received: from localhost ([127.0.0.1]:55251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r92yy-00085X-NG for submit@debbugs.gnu.org; Fri, 01 Dec 2023 07:51:00 -0500 Received: from lists.gnu.org ([2001:470:142::17]:47384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r92yx-00085C-7Q for submit@debbugs.gnu.org; Fri, 01 Dec 2023 07:50:59 -0500 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 1r92yY-0003Ku-AR for bug-gnu-emacs@gnu.org; Fri, 01 Dec 2023 07:50:35 -0500 Received: from mail.muc.de ([193.149.48.3]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r92y9-0006p0-Kv for bug-gnu-emacs@gnu.org; Fri, 01 Dec 2023 07:50:34 -0500 Received: (qmail 40254 invoked by uid 3782); 1 Dec 2023 13:49:53 +0100 Received: from acm.muc.de (p4fe15fc1.dip0.t-ipconnect.de [79.225.95.193]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 01 Dec 2023 13:49:53 +0100 Received: (qmail 7380 invoked by uid 1000); 1 Dec 2023 12:49:52 -0000 Date: Fri, 1 Dec 2023 12:49:52 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.3; envelope-from=acm@muc.de; helo=mail.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) Hello, Emacs. On a recent Emacs master: (i) emacs -Q (ii) In *scratch* enter the following: (byte-compile (lambda (x) "doc" "foo")) . (iii) Enter C-u C-x C-e to evaluate the form. The result looks like: #[257 "\300\207" [nil] 2 "doc (fn X)"] . This is incorrect. The only form in the constants vector is nil. It should be "foo". (iv) Note that this only happens with the unused parameter x. Without it, the form compiles correctly. -- Alan Mackenzie (Nuremberg, Germany). From unknown Fri Aug 15 20:56:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67568: Emacs master: Bug in byte compiler when there's an unused parameter. Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Dec 2023 13:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67568 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Mackenzie , 67568@debbugs.gnu.org Cc: Stefan Monnier Received: via spool by 67568-submit@debbugs.gnu.org id=B67568.170143600332750 (code B ref 67568); Fri, 01 Dec 2023 13:07:02 +0000 Received: (at 67568) by debbugs.gnu.org; 1 Dec 2023 13:06:43 +0000 Received: from localhost ([127.0.0.1]:55272 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r93EB-0008W9-At for submit@debbugs.gnu.org; Fri, 01 Dec 2023 08:06:43 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:39051) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r93E9-0008Vv-Ei for 67568@debbugs.gnu.org; Fri, 01 Dec 2023 08:06:42 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 5B20D5C012C; Fri, 1 Dec 2023 08:06:27 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 01 Dec 2023 08:06:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1701435987; x=1701522387; bh=2YsiZgREyBUc86QuPVQmBVu0ZUJDmf/U3yp pJjDIdNg=; b=wPwj8bihkUWWADB1HpqS5sqsA/qUD/CR3hRNeTRfT+0a8FmHyrv dmzFLit7KgHUKH1TMbfBEOsKg4cktoCJSOnGLWNTOyM9cdVlViCcmbEDI2Bwlmnm kN5fc63Mr8vsEk5t3Ztd0IYZcT2RIVeay8M/xcmMPXcCrW4hhdjfuHcJPl/uN3SN Tx9fpeBKAvJ42zN3Ea+2TxVLFIvpNvQrbwpQ1SQHYELTOJeE38ggvw3PBAzwfWGk +RVDv0nzzfXov6RyXGAzEgmJMj3GjNn/PVXTJnfnGuRoo071jTFX/laN7JuikpXt a9XknbuCS5Ak/9YJV6sQRG1MoAqJ5Gu2MiQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1701435987; x=1701522387; bh=2YsiZgREyBUc86QuPVQmBVu0ZUJDmf/U3yp pJjDIdNg=; b=ieCV5HHNWDUj/HLUCz4kGYlfBn3wsJDgDiyh2rYxDCtnjgf+CK6 3byHwhirVjN2OIt1g2vW0Bphujxu+YGcptxHfNkocpSqZ8rOUH5TTegA0C61mkEq k4g8HxGfHcvetazbp+KBOyjQnzH1aOutCBodB9y/vbWb0kB71CzIRco3zzlriX9W pSPl3Q+rRwlEhdWPqvpUPoCUq7qJ7ws9fvht6HA8gXZTYhXddHDjJqFOu2hkJdpT QiiQBgtph6WPXWDkOnBBSsCuC/vI361X+GPw/fmR+KYCyR+5VHrOjXlLGJMp8wtn 8nhdgPTQ9x29GAUr5QnpOuHaeOzWzQmMM1g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeiledggeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 1 Dec 2023 08:06:25 -0500 (EST) Message-ID: <1c2d9219-093c-0726-13ce-2c952f6e33ba@gutov.dev> Date: Fri, 1 Dec 2023 15:06:23 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US References: From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.9 (---) On 01/12/2023 14:49, Alan Mackenzie wrote: > On a recent Emacs master: > > (i) emacs -Q > (ii) In*scratch* enter the following: > > (byte-compile (lambda (x) "doc" "foo")) > > . > (iii) Enter C-u C-x C-e to evaluate the form. The result looks like: > > #[257 "\300\207" [nil] 2 "doc > > (fn X)"] > > . This is incorrect. The only form in the constants vector is nil. > It should be "foo". > > (iv) Note that this only happens with the unused parameter x. Without > it, the form compiles correctly. Might be a bug in the interpreter too? (funcall (lambda (x) "doc" "foo") 2) ;; => nil From unknown Fri Aug 15 20:56:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67568: Emacs master: Bug in byte compiler when there's an unused parameter. Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Dec 2023 14:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67568 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: Stefan Monnier , 67568@debbugs.gnu.org Received: via spool by 67568-submit@debbugs.gnu.org id=B67568.170144023417929 (code B ref 67568); Fri, 01 Dec 2023 14:18:01 +0000 Received: (at 67568) by debbugs.gnu.org; 1 Dec 2023 14:17:14 +0000 Received: from localhost ([127.0.0.1]:55354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r94KQ-0004f7-Ds for submit@debbugs.gnu.org; Fri, 01 Dec 2023 09:17:14 -0500 Received: from mail.muc.de ([193.149.48.3]:49769) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r94KL-0004eq-T2 for 67568@debbugs.gnu.org; Fri, 01 Dec 2023 09:17:12 -0500 Received: (qmail 41978 invoked by uid 3782); 1 Dec 2023 15:16:54 +0100 Received: from acm.muc.de (p4fe15fc1.dip0.t-ipconnect.de [79.225.95.193]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 01 Dec 2023 15:16:54 +0100 Received: (qmail 8832 invoked by uid 1000); 1 Dec 2023 14:16:53 -0000 Date: Fri, 1 Dec 2023 14:16:53 +0000 Message-ID: References: <1c2d9219-093c-0726-13ce-2c952f6e33ba@gutov.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1c2d9219-093c-0726-13ce-2c952f6e33ba@gutov.dev> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Dmitry. On Fri, Dec 01, 2023 at 15:06:23 +0200, Dmitry Gutov wrote: > On 01/12/2023 14:49, Alan Mackenzie wrote: > > On a recent Emacs master: > > (i) emacs -Q > > (ii) In*scratch* enter the following: > > (byte-compile (lambda (x) "doc" "foo")) > > . > > (iii) Enter C-u C-x C-e to evaluate the form. The result looks like: > > #[257 "\300\207" [nil] 2 "doc > > (fn X)"] > > . This is incorrect. The only form in the constants vector is nil. > > It should be "foo". > > (iv) Note that this only happens with the unused parameter x. Without > > it, the form compiles correctly. > Might be a bug in the interpreter too? > (funcall (lambda (x) "doc" "foo") 2) > ;; => nil Outch! Thanks for spotting that, it might make the bug easier to solve. -- Alan Mackenzie (Nuremberg, Germany). From unknown Fri Aug 15 20:56:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67568: Emacs master: Bug in byte compiler when there's an unused parameter. Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Dec 2023 15:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67568 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: acm@muc.de, Stefan Monnier , 67568@debbugs.gnu.org Received: via spool by 67568-submit@debbugs.gnu.org id=B67568.170144416724919 (code B ref 67568); Fri, 01 Dec 2023 15:23:01 +0000 Received: (at 67568) by debbugs.gnu.org; 1 Dec 2023 15:22:47 +0000 Received: from localhost ([127.0.0.1]:55951 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r95Lr-0006Tr-B4 for submit@debbugs.gnu.org; Fri, 01 Dec 2023 10:22:47 -0500 Received: from mail.muc.de ([193.149.48.3]:51706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r95Lm-0006TM-Ut for 67568@debbugs.gnu.org; Fri, 01 Dec 2023 10:22:45 -0500 Received: (qmail 17229 invoked by uid 3782); 1 Dec 2023 16:22:25 +0100 Received: from acm.muc.de (p4fe15fc1.dip0.t-ipconnect.de [79.225.95.193]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 01 Dec 2023 16:22:25 +0100 Received: (qmail 9176 invoked by uid 1000); 1 Dec 2023 15:22:24 -0000 Date: Fri, 1 Dec 2023 15:22:24 +0000 Message-ID: References: <1c2d9219-093c-0726-13ce-2c952f6e33ba@gutov.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1c2d9219-093c-0726-13ce-2c952f6e33ba@gutov.dev> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello again, Dmitry. On Fri, Dec 01, 2023 at 15:06:23 +0200, Dmitry Gutov wrote: > On 01/12/2023 14:49, Alan Mackenzie wrote: > > On a recent Emacs master: > > (i) emacs -Q > > (ii) In*scratch* enter the following: > > (byte-compile (lambda (x) "doc" "foo")) > > . > > (iii) Enter C-u C-x C-e to evaluate the form. The result looks like: > > #[257 "\300\207" [nil] 2 "doc > > (fn X)"] > > . This is incorrect. The only form in the constants vector is nil. > > It should be "foo". > > (iv) Note that this only happens with the unused parameter x. Without > > it, the form compiles correctly. > Might be a bug in the interpreter too? > (funcall (lambda (x) "doc" "foo") 2) > ;; => nil I have a candidate for the buggy function, namely macroexp-parse-body. It'd doc string reads "Parse a function BODY into (DECLARATIONS . EXPS).", but it's vague about what precisely a BODY is. It's not clear, either, what exactly is meant by DECLARATIONS. What the function does is move strings (or :documentation forms) from the head of BODY into DECLS. So maybe DECLARATIONS is intended to be any number of consecutive doc strings. Exceptionally, if there is precisely one string, it is not moved into DECLS. When BODY is ("doc" "foo") as is the case here, both "doc" and "foo" get moved from BODY to DECLS, leaving an empty BODY and a wrong DECLS. The return value is here (("doc" "foo") . nil), which is clearly wrong. It probably should be (("doc") . ("foo")). -- Alan Mackenzie (Nuremberg, Germany). From unknown Fri Aug 15 20:56:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67568: Emacs master: Bug in byte compiler when there's an unused parameter. Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Dec 2023 15:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67568 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Mackenzie Cc: Dmitry Gutov , 67568@debbugs.gnu.org Received: via spool by 67568-submit@debbugs.gnu.org id=B67568.170144527626881 (code B ref 67568); Fri, 01 Dec 2023 15:42:01 +0000 Received: (at 67568) by debbugs.gnu.org; 1 Dec 2023 15:41:16 +0000 Received: from localhost ([127.0.0.1]:55993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r95dk-0006zV-AP for submit@debbugs.gnu.org; Fri, 01 Dec 2023 10:41:16 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:23533) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r95dh-0006zD-0A for 67568@debbugs.gnu.org; Fri, 01 Dec 2023 10:41:15 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 46FB41000AD; Fri, 1 Dec 2023 10:40:58 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1701445257; bh=KQAq6hNVgJmk13yxtEhDeRe2pvB0BTRjsl76tkgFlzw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=hnbMAfvmG4cBcC7toY6mRNGT4/g3FquvVphQviWrSXBbLCPzaiCJQWvZQW370p4ZZ x92ENB0gAP0bgoHo968Lb8XRXETddruv196oI0Iao/RwT/b+YV/F56UCBvbU6c4eOl rquxMxSJChZ6TZUduvNsUJ+DtjYXsErEF171yw90wOxDqmfExz0zkkHZFBkuFedJ80 a0/AByk1qw9gnzISX9V47pFJiKy9RXvWrGdii4yM+Bg0BoimZ8P5Gdg+1iMY+8aqQM UAJvvIuP+Vde9qIaRMTCAt8XL1+afglw+gPVL6mRn+d7CmF5g0wnOfKy61iPMuD63z f90Y99ZCpeMzA== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 93648100043; Fri, 1 Dec 2023 10:40:57 -0500 (EST) Received: from alfajor (rrcs-108-176-28-115.nyc.biz.rr.com [108.176.28.115]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6FFB01201FA; Fri, 1 Dec 2023 10:40:57 -0500 (EST) From: Stefan Monnier In-Reply-To: (Alan Mackenzie's message of "Fri, 1 Dec 2023 15:22:24 +0000") Message-ID: References: <1c2d9219-093c-0726-13ce-2c952f6e33ba@gutov.dev> Date: Fri, 01 Dec 2023 10:40:55 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > I have a candidate for the buggy function, namely macroexp-parse-body. Duh! I think the patch below should fix it. Stefan diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index 6eb670d6dc1..6ed3e0c4896 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -540,7 +540,9 @@ macroexp-parse-body (while (and body (let ((e (car body))) - (or (stringp e) + (or (and (stringp e) + ;; Only the first string can be a docstring. + (not (delq nil (mapcar #'stringp decls)))) (memq (car-safe e) '(:documentation declare interactive cl-declare))))) (push (pop body) decls))) From unknown Fri Aug 15 20:56:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67568: Emacs master: Bug in byte compiler when there's an unused parameter. Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Dec 2023 16:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67568 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: Dmitry Gutov , acm@muc.de, 67568@debbugs.gnu.org Received: via spool by 67568-submit@debbugs.gnu.org id=B67568.170144847732712 (code B ref 67568); Fri, 01 Dec 2023 16:35:02 +0000 Received: (at 67568) by debbugs.gnu.org; 1 Dec 2023 16:34:37 +0000 Received: from localhost ([127.0.0.1]:56037 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r96TN-0008VY-1C for submit@debbugs.gnu.org; Fri, 01 Dec 2023 11:34:37 -0500 Received: from mail.muc.de ([193.149.48.3]:53870) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r96TK-0008VD-LM for 67568@debbugs.gnu.org; Fri, 01 Dec 2023 11:34:35 -0500 Received: (qmail 99655 invoked by uid 3782); 1 Dec 2023 17:34:19 +0100 Received: from acm.muc.de (p4fe15fc1.dip0.t-ipconnect.de [79.225.95.193]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 01 Dec 2023 17:34:18 +0100 Received: (qmail 10750 invoked by uid 1000); 1 Dec 2023 16:34:18 -0000 Date: Fri, 1 Dec 2023 16:34:18 +0000 Message-ID: References: <1c2d9219-093c-0726-13ce-2c952f6e33ba@gutov.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Stefan. On Fri, Dec 01, 2023 at 10:40:55 -0500, Stefan Monnier wrote: > > I have a candidate for the buggy function, namely macroexp-parse-body. > Duh! > I think the patch below should fix it. It certainly will in the test case, yes. I think I understand the function better now, thanks. Are you going to commit your patch, or should I? :-) > Stefan > diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el > index 6eb670d6dc1..6ed3e0c4896 100644 > --- a/lisp/emacs-lisp/macroexp.el > +++ b/lisp/emacs-lisp/macroexp.el > @@ -540,7 +540,9 @@ macroexp-parse-body > (while > (and body > (let ((e (car body))) > - (or (stringp e) > + (or (and (stringp e) > + ;; Only the first string can be a docstring. > + (not (delq nil (mapcar #'stringp decls)))) > (memq (car-safe e) > '(:documentation declare interactive cl-declare))))) > (push (pop body) decls))) -- Alan Mackenzie (Nuremberg, Germany). From unknown Fri Aug 15 20:56:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67568: Emacs master: Bug in byte compiler when there's an unused parameter. Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Dec 2023 15:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67568 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Mackenzie Cc: Dmitry Gutov , 67568@debbugs.gnu.org Received: via spool by 67568-submit@debbugs.gnu.org id=B67568.170161897917706 (code B ref 67568); Sun, 03 Dec 2023 15:57:02 +0000 Received: (at 67568) by debbugs.gnu.org; 3 Dec 2023 15:56:19 +0000 Received: from localhost ([127.0.0.1]:60655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9opP-0004bW-GM for submit@debbugs.gnu.org; Sun, 03 Dec 2023 10:56:19 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:4268) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9opK-0004bD-OH for 67568@debbugs.gnu.org; Sun, 03 Dec 2023 10:56:17 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id EAC7B1000AD; Sun, 3 Dec 2023 10:55:58 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1701618958; bh=dZkN/JGHgQIDq+ZwyhWxX9vK1ARKn3cW7pf08fVolYo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=DZRcgMRVu1S+dOkuO2dwmezXR9/KYdBy7plZndqiM/RhLFoUH0DwFPYsDNYlL5nVI gLEfDoU62Ldh1j8RPcSYimjNXmn8P/xCLLFFBaik6OOpkNeESQAEwvujYrGuPotnNP sZwzgMBUF3pivFl5uJww14XVkViGBXFBagtx4tN7mYnMtVC1JOVJ6v2IcXRIioltEH VmFytiucl4PlZT7FwbIUNF8Fbe9W04ijSOrc1tq8fFwGCtE7nfMRTJnkTPtOrujXOg yioK3jdRammoo48xfNIx/fslN3x1L3QsPb3VBQnFZxgypxUXWm940ynW7zTV0ho1/g sM77KjzCCyQBg== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 57FB7100043; Sun, 3 Dec 2023 10:55:58 -0500 (EST) Received: from pastel (unknown [45.72.194.97]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 26369120394; Sun, 3 Dec 2023 10:55:58 -0500 (EST) From: Stefan Monnier In-Reply-To: (Alan Mackenzie's message of "Fri, 1 Dec 2023 16:34:18 +0000") Message-ID: References: <1c2d9219-093c-0726-13ce-2c952f6e33ba@gutov.dev> Date: Sun, 03 Dec 2023 10:55:56 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.115 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> I think the patch below should fix it. > It certainly will in the test case, yes. > I think I understand the function better now, thanks. > Are you going to commit your patch, or should I? :-) I'm wondering whether it should go to `emacs-29` or to `master`. I'm leaning toward `emacs-29` because it's rather embarrassing (and perplexing for the user) and the patch is simple. Eli? Stefan? Stefan From unknown Fri Aug 15 20:56:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67568: Emacs master: Bug in byte compiler when there's an unused parameter. Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Dec 2023 16:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67568 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: acm@muc.de, 67568@debbugs.gnu.org, dmitry@gutov.dev Received: via spool by 67568-submit@debbugs.gnu.org id=B67568.170162050320570 (code B ref 67568); Sun, 03 Dec 2023 16:22:02 +0000 Received: (at 67568) by debbugs.gnu.org; 3 Dec 2023 16:21:43 +0000 Received: from localhost ([127.0.0.1]:60677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9pDz-0005Li-9y for submit@debbugs.gnu.org; Sun, 03 Dec 2023 11:21:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9pDw-0005LR-MV for 67568@debbugs.gnu.org; Sun, 03 Dec 2023 11:21:41 -0500 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 1r9pDf-0001Vf-Kx; Sun, 03 Dec 2023 11:21:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=QsdrLVJ2YwyH/I6jib8A9oqRjGRaWIf1uSiFn/cs5F0=; b=kjOg2pX0ecwH sSQ3QZXv7uhPxJDjry/d04ZcpihYTrJgrurBi8+yBMQTZzOWrONC1NVf9sPSCatRazO/Kr0B4VBDy u3rMJLMUH116lqDvbEpYaSsgCpZKYV9VujfaprQ7YFYmAiQtobgmW5KtSy0mSxiUlZ261f1GHo3M6 l+glVTZS/p6kB2bi+9KPKJJb+sCG0SZedV6cO9iN3wQ+D0IPcbXA7bOJVYNtMQqYsa9ZBCr2ekPbO my3OQdcPAHV0NpbezKvlYrwMoADZA2ImufF9c+eGzHRfAfzJGUCD4CLObHn4DUV36sor+GylGhyGL enQste/t1DYDvr/GvCvoEA==; Date: Sun, 03 Dec 2023 18:21:24 +0200 Message-Id: <83il5f6yuz.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (bug-gnu-emacs@gnu.org) References: <1c2d9219-093c-0726-13ce-2c952f6e33ba@gutov.dev> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: Dmitry Gutov , 67568@debbugs.gnu.org > Date: Sun, 03 Dec 2023 10:55:56 -0500 > From: Stefan Monnier via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > >> I think the patch below should fix it. > > It certainly will in the test case, yes. > > I think I understand the function better now, thanks. > > Are you going to commit your patch, or should I? :-) > > I'm wondering whether it should go to `emacs-29` or to `master`. > I'm leaning toward `emacs-29` because it's rather embarrassing (and > perplexing for the user) and the patch is simple. > Eli? Stefan? No objections from me. Thanks. From unknown Fri Aug 15 20:56:47 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Alan Mackenzie Subject: bug#67568: closed (Re: bug#67568: Emacs master: Bug in byte compiler when there's an unused parameter.) Message-ID: References: X-Gnu-PR-Message: they-closed 67568 X-Gnu-PR-Package: emacs Reply-To: 67568@debbugs.gnu.org Date: Sun, 03 Dec 2023 19:26:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1701631562-18666-1" This is a multi-part message in MIME format... ------------=_1701631562-18666-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #67568: Emacs master: Bug in byte compiler when there's an unused parameter. which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 67568@debbugs.gnu.org. --=20 67568: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D67568 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1701631562-18666-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 67568-done) by debbugs.gnu.org; 3 Dec 2023 19:25:06 +0000 Received: from localhost ([127.0.0.1]:32790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9s5R-0004pg-KA for submit@debbugs.gnu.org; Sun, 03 Dec 2023 14:25:05 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:24099) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9s5O-0004p7-P4 for 67568-done@debbugs.gnu.org; Sun, 03 Dec 2023 14:25:04 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id EB292442C7E; Sun, 3 Dec 2023 14:24:46 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1701631485; bh=Je5e5/YSRSB3CUE3jQQBXNbrQEHmsEBmRux1ZbAxh3Y=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=T8N9ocmGy1qRxXL3UcPBEuvqApAr1Xz63EOf0/q1Etax9EczWpQZ0EwgqKsIS6KM1 dVzIamTvho3gliLte8d51u0k1J74WnslrGEJVgSP/av+uN6Rn5g/xEFueCbqFSrPGM xzTZsRATYqI5r3GgwQWK/nHwCoosJMZosxH75T/Z8aZKjT+2O0n48CoFMuP/MkbRnw aj8V2oNa8QwAzizcnp/2X9ipagS0+ZAFU32Ae91dPbJVk9kQDBlMKe+kjIYMnqLHcs WAl9yBorTnxJW1KdMhjPD+xh7NR0sG+PYuZmIpFMIbacubtwbm/P7815FPRvlY3LfR vdhAZL8IDwzjw== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C76A6442C7B; Sun, 3 Dec 2023 14:24:45 -0500 (EST) Received: from alfajor (unknown [45.72.194.97]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 706A21202FF; Sun, 3 Dec 2023 14:24:45 -0500 (EST) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#67568: Emacs master: Bug in byte compiler when there's an unused parameter. In-Reply-To: <83il5f6yuz.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 03 Dec 2023 18:21:24 +0200") Message-ID: References: <1c2d9219-093c-0726-13ce-2c952f6e33ba@gutov.dev> <83il5f6yuz.fsf@gnu.org> Date: Sun, 03 Dec 2023 14:24:44 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.026 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67568-done Cc: dmitry@gutov.dev, acm@muc.de, 67568-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> I'm wondering whether it should go to `emacs-29` or to `master`. >> I'm leaning toward `emacs-29` because it's rather embarrassing (and >> perplexing for the user) and the patch is simple. >> Eli? Stefan? > No objections from me. It turns out the bug is not present in `emacs-29`, it was introduced on master by: commit f616edb4ccce5b9d60e3ff42806bd2131989cd1e Author: Mattias Engdeg=E5rd Date: Mon Sep 25 14:40:11 2023 +0200 macroexp-parse-body: correct parsing of empty body (bug#66136) =20=20=20=20 * lisp/emacs-lisp/macroexp.el (macroexp-parse-body): Return an empty body even when there are declarations present. Previously, the last declaration was considered part of the body, which is only correct if the input consists of a single string. =20=20=20=20 Reported by Jens Schmidt. So I pushed a better fix, on master. Stefan ------------=_1701631562-18666-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 1 Dec 2023 12:51:01 +0000 Received: from localhost ([127.0.0.1]:55251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r92yy-00085X-NG for submit@debbugs.gnu.org; Fri, 01 Dec 2023 07:51:00 -0500 Received: from lists.gnu.org ([2001:470:142::17]:47384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r92yx-00085C-7Q for submit@debbugs.gnu.org; Fri, 01 Dec 2023 07:50:59 -0500 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 1r92yY-0003Ku-AR for bug-gnu-emacs@gnu.org; Fri, 01 Dec 2023 07:50:35 -0500 Received: from mail.muc.de ([193.149.48.3]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r92y9-0006p0-Kv for bug-gnu-emacs@gnu.org; Fri, 01 Dec 2023 07:50:34 -0500 Received: (qmail 40254 invoked by uid 3782); 1 Dec 2023 13:49:53 +0100 Received: from acm.muc.de (p4fe15fc1.dip0.t-ipconnect.de [79.225.95.193]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 01 Dec 2023 13:49:53 +0100 Received: (qmail 7380 invoked by uid 1000); 1 Dec 2023 12:49:52 -0000 Date: Fri, 1 Dec 2023 12:49:52 +0000 To: bug-gnu-emacs@gnu.org Subject: Emacs master: Bug in byte compiler when there's an unused parameter. Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-DEBBUGS-CC: Stefan Monnier X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.3; envelope-from=acm@muc.de; helo=mail.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) Hello, Emacs. On a recent Emacs master: (i) emacs -Q (ii) In *scratch* enter the following: (byte-compile (lambda (x) "doc" "foo")) . (iii) Enter C-u C-x C-e to evaluate the form. The result looks like: #[257 "\300\207" [nil] 2 "doc (fn X)"] . This is incorrect. The only form in the constants vector is nil. It should be "foo". (iv) Note that this only happens with the unused parameter x. Without it, the form compiles correctly. -- Alan Mackenzie (Nuremberg, Germany). ------------=_1701631562-18666-1-- From unknown Fri Aug 15 20:56:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67568: Emacs master: Bug in byte compiler when there's an unused parameter. Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Dec 2023 19:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67568 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: dmitry@gutov.dev, acm@muc.de, 67568-done@debbugs.gnu.org Received: via spool by 67568-done@debbugs.gnu.org id=D67568.170163170018894 (code D ref 67568); Sun, 03 Dec 2023 19:29:02 +0000 Received: (at 67568-done) by debbugs.gnu.org; 3 Dec 2023 19:28:20 +0000 Received: from localhost ([127.0.0.1]:32799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9s8a-0004uf-A0 for submit@debbugs.gnu.org; Sun, 03 Dec 2023 14:28:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36086) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9s8Y-0004uS-1E for 67568-done@debbugs.gnu.org; Sun, 03 Dec 2023 14:28:19 -0500 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 1r9s8I-0005A8-Eg; Sun, 03 Dec 2023 14:28:02 -0500 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=47Hizgf/e+IO3Z16yYfJsgW3sXWfn+JFGVenK8gGJ/o=; b=Swm1svnqlqfHq29wpXXP dWQYiMv8TvWTCo4c1uKgihWxSROT+h4Enji8nm8zBVb/to4UQwXRpHVE9LHKCdj0VpaRBxv8WX18v rnnN3mCsMeu+ZGHhIi9c6Ra9r1ikRT8V4nH6HVN2hX1cN1s7QoqoG9kECRc9SrXimI8GlSrC3ExY0 1ZrjBH/HMmLfn0lnnksg0Kmx67ELY2SLoCT0lJLawB98yX156XEiZTaRTASitqWgfrjDA2FjH6rhK 978x3qZYtPFII8v291An0t0BkWulGL6D1dmfRl80d6N6QuxRfsHialWzYUklIgrh3Pj1hTu8zy9h5 fAi77wX2M4w8jw==; Date: Sun, 03 Dec 2023 21:28:01 +0200 Message-Id: <835y1f6q7y.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Stefan Monnier on Sun, 03 Dec 2023 14:24:44 -0500) References: <1c2d9219-093c-0726-13ce-2c952f6e33ba@gutov.dev> <83il5f6yuz.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Cc: acm@muc.de, 67568-done@debbugs.gnu.org, dmitry@gutov.dev > Date: Sun, 03 Dec 2023 14:24:44 -0500 > > >> I'm wondering whether it should go to `emacs-29` or to `master`. > >> I'm leaning toward `emacs-29` because it's rather embarrassing (and > >> perplexing for the user) and the patch is simple. > >> Eli? Stefan? > > No objections from me. > > It turns out the bug is not present in `emacs-29`, it was introduced on > master by: > > commit f616edb4ccce5b9d60e3ff42806bd2131989cd1e > Author: Mattias Engdegård > Date: Mon Sep 25 14:40:11 2023 +0200 > > macroexp-parse-body: correct parsing of empty body (bug#66136) > > * lisp/emacs-lisp/macroexp.el (macroexp-parse-body): > Return an empty body even when there are declarations present. > Previously, the last declaration was considered part of the body, > which is only correct if the input consists of a single string. > > Reported by Jens Schmidt. > > So I pushed a better fix, on master. Great, thanks.