GNU bug report logs - #80121
31.0.50; cond*/match* (or ...) patterns

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Richard Lawrence <rwl@HIDDEN>; dated Sat, 3 Jan 2026 09:43:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 80121 <at> debbugs.gnu.org:


Received: (at 80121) by debbugs.gnu.org; 17 Jan 2026 12:26:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 17 07:26:24 2026
Received: from localhost ([127.0.0.1]:55905 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vh5Nm-0001Tz-EM
	for submit <at> debbugs.gnu.org; Sat, 17 Jan 2026 07:26:23 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:59576)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vh5Nk-0001Th-1X
 for 80121 <at> debbugs.gnu.org; Sat, 17 Jan 2026 07:26:20 -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 <eliz@HIDDEN>)
 id 1vh5Ne-0004bt-MP; Sat, 17 Jan 2026 07:26:14 -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=X+XsX2+AGyXP6yKQTSK/6zTVLeNfDTp9WUxNxJfCkaw=; b=U7IdNncnBZaT
 5W+UT2VMpXFIDHW1adLmg4YPD+WMjqC5V6UUDG+a2rPSEIfjT1qgO2T/9ArLTvoYTVfY7kiuWuUdQ
 BoqoGmdb/hxqS0kIBBEJJ64HmTfxuKtAMaaH+YNupduuhoqJKANO8jVas7UU99jjYobjq5iBc257X
 eqYUoMZPuQ0hx4wo8h94/xmFVnoVujGEJ6ceW7WmgFhKJT+IFBPOWVYhiewRpGhbpZ7xEmDLQNPWb
 dDk6ex6YJG5KTZ+InE6ilBTo5cEZQLjIY6klNuzHagCqBZH551QqvmssJn4lItTs7l/yoMPoIe+G+
 NKF5ahwnSeAf5LJI8TK/XA==;
Date: Sat, 17 Jan 2026 14:25:00 +0200
Message-Id: <86ikd0s9yb.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Richard Stallman <rms@HIDDEN>
In-Reply-To: <864ip1iv2t.fsf@HIDDEN> (message from Eli Zaretskii on Sun, 04
 Jan 2026 11:30:18 +0200)
Subject: Re: bug#80121: 31.0.50; cond*/match* (or ...) patterns
References: <871pk78244.fsf@HIDDEN>
 <handler.80121.B.17674333333306.ack <at> debbugs.gnu.org>
 <87wm1y7jk3.fsf@HIDDEN> <864ip1iv2t.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 80121
Cc: 80121 <at> debbugs.gnu.org, rwl@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Ping!  Richard, could you please review the patch below?

> Cc: 80121 <at> debbugs.gnu.org
> Date: Sun, 04 Jan 2026 11:30:18 +0200
> From: Eli Zaretskii <eliz@HIDDEN>
> 
> > From: Richard Lawrence <rwl@HIDDEN>
> > Date: Sat, 03 Jan 2026 17:22:20 +0100
> > 
> > rwl@HIDDEN writes:
> > 
> > > The `progn' form which is setting all the bindings to nil is expanded
> > > from `(progn ,@clearing) a little ways below that comment.  It looks
> > > to me like this form is maybe missing a reference to `expression', or
> > > perhaps should be part of a larger form that contains `expression'.
> > 
> > Indeed, the attached patch appears to fix the issue.  But I'm not very
> > familiar with this code, so please verify that it's the right fix.
> 
> Thanks, I've added Richard Stallman, who wrote that code, to this
> discussion.  Richard, any comments to the patch?
> 
> > >From f593b96bca6acb7ff8fad8ef2cd9b69a84900cc5 Mon Sep 17 00:00:00 2001
> > From: Richard Lawrence <rwl@HIDDEN>
> > Date: Sat, 3 Jan 2026 17:10:54 +0100
> > Subject: [PATCH] Fix (or ...) patterns in match*
> > 
> > This is a draft fix for Bug#80121.
> > 
> > * lisp/emacs-lisp/cond-star.el (cond*-subpat): Add missing reference to
> > 'expression' when clearing multiple backtrack aliases.
> > ---
> >  lisp/emacs-lisp/cond-star.el | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/lisp/emacs-lisp/cond-star.el b/lisp/emacs-lisp/cond-star.el
> > index fc8e261339e..26cd858600c 100644
> > --- a/lisp/emacs-lisp/cond-star.el
> > +++ b/lisp/emacs-lisp/cond-star.el
> > @@ -706,7 +706,7 @@ cond*-subpat
> >                             (if (null (cdr clearing))
> >                                 `(or ,expression
> >                                      ,(car clearing))
> > -                             `(progn ,@clearing))))))
> > +                             `(or ,expression (progn ,@clearing)))))))
> >                 (push expression expressions)))
> >             ;; At end of (or...), EACH variable bound by any arm
> >             ;; has a backtrack alias gensym.  At run time, that gensym's value
> > -- 
> > 2.39.5
> > 
> 
> 
> 
> 




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#80121; Package emacs. Full text available.

Message received at 80121 <at> debbugs.gnu.org:


Received: (at 80121) by debbugs.gnu.org; 4 Jan 2026 09:30:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 04 04:30:41 2026
Received: from localhost ([127.0.0.1]:42192 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vcKRc-0002aR-I7
	for submit <at> debbugs.gnu.org; Sun, 04 Jan 2026 04:30:40 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:33496)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vcKRa-0002a3-Ls
 for 80121 <at> debbugs.gnu.org; Sun, 04 Jan 2026 04:30:39 -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 <eliz@HIDDEN>)
 id 1vcKRV-0004bz-Aa; Sun, 04 Jan 2026 04:30:33 -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=0mOI8bUkdR/VmB3k/SxXjjfI2I+D8BAbN5opV6Lu4ac=; b=Mau6ZZLZkkN+
 jw3wmB3eC5T+gXmZULXH3w2fsAR1qfYeGUq+Jj2TCiPyofWhzorswuL+y+WIaXuvdAnUGYKHTox+W
 Tsz9yPRaRn6BZhHTN0gRx37eyzxe5erfXXKMwulAFCzz0Wz2o7bfNBcOSCGF3p1XXVhlckClsKk+M
 9Y6ha0cKQVOZoEUgw+VZM1ss3Mkp0xU0JQYzkTZ7QJeSXJzPnVbPOiKIGPrNdoEm48XxO6gCA6P29
 zaBMw0/Fgp2RkNTB5Uy29YTXPmjIaI2CCjzzz41EytQs4qV4HYW6w7FCJxsn9ZT8W5VnzRx9gOz9X
 V7eiUIhbZMlh024b8o+yAA==;
Date: Sun, 04 Jan 2026 11:30:18 +0200
Message-Id: <864ip1iv2t.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Richard Lawrence <rwl@HIDDEN>, Richard Stallman <rms@HIDDEN>
In-Reply-To: <87wm1y7jk3.fsf@HIDDEN> (message from Richard
 Lawrence on Sat, 03 Jan 2026 17:22:20 +0100)
Subject: Re: bug#80121: 31.0.50; cond*/match* (or ...) patterns
References: <871pk78244.fsf@HIDDEN>
 <handler.80121.B.17674333333306.ack <at> debbugs.gnu.org>
 <87wm1y7jk3.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 80121
Cc: 80121 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Richard Lawrence <rwl@HIDDEN>
> Date: Sat, 03 Jan 2026 17:22:20 +0100
> 
> rwl@HIDDEN writes:
> 
> > The `progn' form which is setting all the bindings to nil is expanded
> > from `(progn ,@clearing) a little ways below that comment.  It looks
> > to me like this form is maybe missing a reference to `expression', or
> > perhaps should be part of a larger form that contains `expression'.
> 
> Indeed, the attached patch appears to fix the issue.  But I'm not very
> familiar with this code, so please verify that it's the right fix.

Thanks, I've added Richard Stallman, who wrote that code, to this
discussion.  Richard, any comments to the patch?

> >From f593b96bca6acb7ff8fad8ef2cd9b69a84900cc5 Mon Sep 17 00:00:00 2001
> From: Richard Lawrence <rwl@HIDDEN>
> Date: Sat, 3 Jan 2026 17:10:54 +0100
> Subject: [PATCH] Fix (or ...) patterns in match*
> 
> This is a draft fix for Bug#80121.
> 
> * lisp/emacs-lisp/cond-star.el (cond*-subpat): Add missing reference to
> 'expression' when clearing multiple backtrack aliases.
> ---
>  lisp/emacs-lisp/cond-star.el | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lisp/emacs-lisp/cond-star.el b/lisp/emacs-lisp/cond-star.el
> index fc8e261339e..26cd858600c 100644
> --- a/lisp/emacs-lisp/cond-star.el
> +++ b/lisp/emacs-lisp/cond-star.el
> @@ -706,7 +706,7 @@ cond*-subpat
>                             (if (null (cdr clearing))
>                                 `(or ,expression
>                                      ,(car clearing))
> -                             `(progn ,@clearing))))))
> +                             `(or ,expression (progn ,@clearing)))))))
>                 (push expression expressions)))
>             ;; At end of (or...), EACH variable bound by any arm
>             ;; has a backtrack alias gensym.  At run time, that gensym's value
> -- 
> 2.39.5
> 




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#80121; Package emacs. Full text available.

Message received at 80121 <at> debbugs.gnu.org:


Received: (at 80121) by debbugs.gnu.org; 3 Jan 2026 16:22:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 03 11:22:32 2026
Received: from localhost ([127.0.0.1]:37550 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vc4Oe-0003lG-7F
	for submit <at> debbugs.gnu.org; Sat, 03 Jan 2026 11:22:32 -0500
Received: from fhigh-a8-smtp.messagingengine.com ([103.168.172.159]:34445)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <rwl@HIDDEN>)
 id 1vc4Ob-0003kz-9c
 for 80121 <at> debbugs.gnu.org; Sat, 03 Jan 2026 11:22:30 -0500
Received: from phl-compute-11.internal (phl-compute-11.internal [10.202.2.51])
 by mailfhigh.phl.internal (Postfix) with ESMTP id BD64C1400015
 for <80121 <at> debbugs.gnu.org>; Sat,  3 Jan 2026 11:22:23 -0500 (EST)
Received: from phl-frontend-04 ([10.202.2.163])
 by phl-compute-11.internal (MEProxy); Sat, 03 Jan 2026 11:22:23 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 recursewithless.net; h=cc:content-type:content-type:date:date
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1767457343;
 x=1767543743; bh=M1f9RbieyNvjGczZ/BQZO2Tvmtx7rHlAXip/rzrKDmw=; b=
 k9cXdBsBicgyTaGapaKytfHtk5/Jc5YltowgYCjN+pOfGqFjMRbvWnCDgTVQrLcp
 LcTXj3yWWtYSSvNN+yAmgkteEpEeNZx8dRJLjhHnT9khkeu4Znpf4dRhsxyKQLIM
 HZZhpbYnIZjDqBKmuc0eCo2UxTb/x/SrxcXrLl0y2iNE5z6qdDXKBvx+Y4ncfW7i
 vsJCwGpHligADHi+oPmmyehyNLoLtlr0h2MqXsccqtOduJOkdghRoFB024i1KWTA
 1rgHWNgw51prqO++IwYzptRPt/iOVeDUaJC3HyafR8/S/jU+faHz4aDB3oPzKgAv
 Cpi5yVrkfs4G8s0Dh+TJxg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc: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:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
 1767457343; x=1767543743; bh=M1f9RbieyNvjGczZ/BQZO2Tvmtx7rHlAXip
 /rzrKDmw=; b=Csu9HsOpzHkCHqUvNN50swwuWZmFYasa0VibA9KQp8PqWtKHvgE
 Wyea2iyvNQuqGjQKV+kqqku+EpGz+0kjwybmgXNozbo2WX1Xa/4UGgyFt6kBQRpN
 o3ktZnsmf5K32ndWtHfNvZ+LUGMUuucdHL3t68pVY34Bd5OJIDD6JAQabTTzF2sf
 KfYnkbL4tptpzfR4f8fnp77xXQaccG8Dmig59gvGXRgMNcQiNxtDlkQZtLTHD9MJ
 YBhxJkNV1v4M+DvW1lebLHk+fbGhflf2KGX/CxkRQLNspxNfB11fxbVm0hUGRkvG
 a7KBq8M5cGrmIg6+5JyVTRxiEp3ZslRxavw==
X-ME-Sender: <xms:P0JZaTcJnPVQ37vIwiy2xU3IpXAJnrPuxNfjs4sRTyUo_sryf77evQ>
 <xme:P0JZaQJrC5tsuey2XZ2vtvXqpmIRG7t-jTlj9I3tVqivCWXVNxUHgaq7-UVBvBbX5
 ite_VrfFlh0AqxbfcQ7TMCoEP0AbiOB_b78Ays85KUYq-GIzyp5Cg>
X-ME-Received: <xmr:P0JZaSLH-iP9y1etwWoVrhUHb2ewI1WJ4X6Zbq32w1g5VyiLO12ZVxQOWFY7J6SBhb8IU4evHdhqv69v8oFMn4xpw7g_EM5DMjBpug>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdelvddtudcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr
 ihhlohhuthemuceftddtnecunecujfgurhephffvufgjfhffkfggtgesmhdtreertddttd
 enucfhrhhomheptfhitghhrghrugcunfgrfihrvghntggvuceorhiflhesrhgvtghurhhs
 vgifihhthhhlvghsshdrnhgvtheqnecuggftrfgrthhtvghrnheptdektddvieetheettd
 evffdtffehgeekgfejudeugeduudffffekhfekudeuhedunecuvehluhhsthgvrhfuihii
 vgeptdenucfrrghrrghmpehmrghilhhfrhhomheprhiflhesrhgvtghurhhsvgifihhthh
 hlvghsshdrnhgvthdpnhgspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpdhr
 tghpthhtohepkedtuddvudesuggvsggsuhhgshdrghhnuhdrohhrgh
X-ME-Proxy: <xmx:P0JZaaHWfBhGLpfU6XCU0Ccpd6PiNI7UGifed8K2RJNQjPupft8c9w>
 <xmx:P0JZafn9jLEnHA1Im6kHFfdncAR0xkny0VRQgLJZaxAYn01LckXLsA>
 <xmx:P0JZafLFbBZqy5mDy9ket8kvHghtXnj_-T2ID64mvJv0ijUfN_HQ3w>
 <xmx:P0JZaYa9PqwB8Adbou8bT6059DvniSnLBgIhG9DeHuZioIkp7jqL3g>
 <xmx:P0JZaRXZjKiEYDXNmmTuiI27vhwtZoGESCHQuz7EI1gYURTzAlK_mJNv>
Feedback-ID: if7394488:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA for
 <80121 <at> debbugs.gnu.org>; Sat, 3 Jan 2026 11:22:22 -0500 (EST)
From: Richard Lawrence <rwl@HIDDEN>
To: 80121 <at> debbugs.gnu.org
Subject: Re: bug#80121: 31.0.50; cond*/match* (or ...) patterns 
In-Reply-To: <handler.80121.B.17674333333306.ack <at> debbugs.gnu.org>
References: <871pk78244.fsf@HIDDEN>
 <handler.80121.B.17674333333306.ack <at> debbugs.gnu.org>
Date: Sat, 03 Jan 2026 17:22:20 +0100
Message-ID: <87wm1y7jk3.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 80121
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

rwl@HIDDEN writes:

> The `progn' form which is setting all the bindings to nil is expanded
> from `(progn ,@clearing) a little ways below that comment.  It looks
> to me like this form is maybe missing a reference to `expression', or
> perhaps should be part of a larger form that contains `expression'.

Indeed, the attached patch appears to fix the issue.  But I'm not very
familiar with this code, so please verify that it's the right fix.

-- 
Best,
Richard


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=0001-Fix-or-.-patterns-in-match.patch

From f593b96bca6acb7ff8fad8ef2cd9b69a84900cc5 Mon Sep 17 00:00:00 2001
From: Richard Lawrence <rwl@HIDDEN>
Date: Sat, 3 Jan 2026 17:10:54 +0100
Subject: [PATCH] Fix (or ...) patterns in match*

This is a draft fix for Bug#80121.

* lisp/emacs-lisp/cond-star.el (cond*-subpat): Add missing reference to
'expression' when clearing multiple backtrack aliases.
---
 lisp/emacs-lisp/cond-star.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/cond-star.el b/lisp/emacs-lisp/cond-star.el
index fc8e261339e..26cd858600c 100644
--- a/lisp/emacs-lisp/cond-star.el
+++ b/lisp/emacs-lisp/cond-star.el
@@ -706,7 +706,7 @@ cond*-subpat
                            (if (null (cdr clearing))
                                `(or ,expression
                                     ,(car clearing))
-                             `(progn ,@clearing))))))
+                             `(or ,expression (progn ,@clearing)))))))
                (push expression expressions)))
            ;; At end of (or...), EACH variable bound by any arm
            ;; has a backtrack alias gensym.  At run time, that gensym's value
-- 
2.39.5


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#80121; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 3 Jan 2026 09:42:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 03 04:42:13 2026
Received: from localhost ([127.0.0.1]:33534 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vby9D-0000r9-Js
	for submit <at> debbugs.gnu.org; Sat, 03 Jan 2026 04:42:13 -0500
Received: from lists.gnu.org ([2001:470:142::17]:48918)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <rwl@HIDDEN>)
 id 1vby9A-0000qK-Of
 for submit <at> debbugs.gnu.org; Sat, 03 Jan 2026 04:42:09 -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 <rwl@HIDDEN>)
 id 1vby93-0000yb-2h
 for bug-gnu-emacs@HIDDEN; Sat, 03 Jan 2026 04:42:01 -0500
Received: from fhigh-b4-smtp.messagingengine.com ([202.12.124.155])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <rwl@HIDDEN>)
 id 1vby8z-0003m0-L6
 for bug-gnu-emacs@HIDDEN; Sat, 03 Jan 2026 04:42:00 -0500
Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43])
 by mailfhigh.stl.internal (Postfix) with ESMTP id 1D4267A013B
 for <bug-gnu-emacs@HIDDEN>; Sat,  3 Jan 2026 04:41:49 -0500 (EST)
Received: from phl-frontend-03 ([10.202.2.162])
 by phl-compute-03.internal (MEProxy); Sat, 03 Jan 2026 04:41:49 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 recursewithless.net; h=cc:content-type:content-type:date:date
 :from:from:in-reply-to:message-id:mime-version:reply-to:subject
 :subject:to:to; s=fm1; t=1767433308; x=1767519708; bh=43iFgRlvPI
 K3kiQ/oC62ItgMqfDsvjMT+t+UpbnWdpk=; b=fcqJ+9elgle51vX9jXEGoWUySA
 Dof0f/6J5G1DMPl3a2NTGvGgeTRI/u86aNH3fJyoWzRP7bvlj4YXWgDfDLDL1+i0
 DBA9qOlsJJ1OYinW6lhKR6eLNp6FMhQ+HK/Ui9zHfQNUFPfOPfDATAhvMe3sUnyQ
 HbvSmqwPwJ0u1SKARzyYg1rOPpFRk3YjHm82E84PCIir5m1kvgzeUeWGiuXdmIT0
 4WMDtYo0reYasBa+phYo0it65owcjlli7eHDtlD3zJwDlSTDxL9UP34LBBWril3Y
 KZ+p69KK02CZB3/y3mgjodrHVXtXSEbfnqRD2ez1GlVT1xtNA+D24WNxxVxg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:message-id
 :mime-version:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1767433308; x=
 1767519708; bh=43iFgRlvPIK3kiQ/oC62ItgMqfDsvjMT+t+UpbnWdpk=; b=s
 CW1D4v9/IAeSwXdDqS5sF1dJKnriVexlDHaedqGJ3LtMVaxTAdqqZm1ps0fsu5Wx
 +hlKf50YCHIPTiWAyuOLf8XC3RZfMhlQn1o7RyuwqLBzUf24tvHnh0fD0VH0EKiQ
 KtSaoAIoRZbgpQJTbL5JpF2EFZHxqgL7ZOrmc8x9RYL5nDuIIJB901STD3JvCquJ
 fXITbFfNN3moPh12TWe7iHi3+b0Uum9gxKJTh531goF79ci5LaP9XfcrKXMVELi7
 wi8VQaCqYo9zQAuq6DMNKFORIY3jk8w7ogY5g9WarPp9g8Y9GdEUJyeElBpYDqUe
 lXBC+++EgKSSWHAoqQxIQ==
X-ME-Sender: <xms:XORYaVBd07h2S5rQ3_9W-oMLat2wxuL3Rh3uiiT9vRKXJxRY7myIpQ>
 <xme:XORYaZYsMnAsoOWV50eTZZmIV4NkF1bbjdS3yVVmJXAA3aWK5-JGL2zIyEEdpuMMk
 ffJN8PWv2GvErm6LXxMZpoT-vzj8HT6_5PUnQs_3EjHgm_fO9yM1Q>
X-ME-Received: <xmr:XORYabqMZBCtxFocNSK1t7x1MOU3XClGEv29Yrm1p0ZCkseTunPMofpexSmZwaLpNg4phVGroRyIANZ6pStNJ6z_m3-TYT0SmTuKAA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdeluddvudcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr
 ihhlohhuthemuceftddtnecunecujfgurhephffvufffkfggtgesthdtredttddttdenuc
 fhrhhomheptfhitghhrghrugcunfgrfihrvghntggvuceorhiflhesrhgvtghurhhsvgif
 ihhthhhlvghsshdrnhgvtheqnecuggftrfgrthhtvghrnhepkeelgfettefgtdduhfdvgf
 duleffffeggfffgeehtdekveevvdeludffteejkefhnecuvehluhhsthgvrhfuihiivgep
 tdenucfrrghrrghmpehmrghilhhfrhhomheprhiflhesrhgvtghurhhsvgifihhthhhlvg
 hsshdrnhgvthdpnhgspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghp
 thhtohepsghughdqghhnuhdqvghmrggtshesghhnuhdrohhrgh
X-ME-Proxy: <xmx:XORYackbV_-E-wWPK1aFOMCHyRlgj6KV1JZExare7QJ04qAkRWYDGQ>
 <xmx:XORYad3Ve2IhoZGCCaWF8135IKIf-CslGtFZQ-IQnlo6NDfxO4ov_A>
 <xmx:XORYaUAeEGcVdDR4nQmpZidnKKs502FeuTJyKaHrptn81__Wdf2Edg>
 <xmx:XORYaaxWL2EnoJ_p4GMHTm7zn9tejWE-NKQCGRTFc9pG8vV2bgvXhw>
 <xmx:XORYaXR-uvvZY1wa0lHVSjivlQMVnzYVUQDk8fwUKJwVD9gaGTRYi09u>
Feedback-ID: if7394488:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA for
 <bug-gnu-emacs@HIDDEN>; Sat, 3 Jan 2026 04:41:48 -0500 (EST)
From: Richard Lawrence <rwl@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 31.0.50; cond*/match* (or ...) patterns 
X-Debbugs-Cc: 
Date: Sat, 03 Jan 2026 10:41:31 +0100
Message-ID: <871pk78244.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=202.12.124.155;
 envelope-from=rwl@HIDDEN; helo=fhigh-b4-smtp.messagingengine.com
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)

I am experimenting with `cond*' and `match*' for the first time, and
think I've run into a bug in (or ...) subpatterns.

I have a list of tokens represented like this:

((:date ... :begin ... :end ...)
 (:time ... :begin ... :end ...)
 ...)

I want to match, e.g., the first two items on this list when one is a
date and the other is a time.  So I wrote:

(cond*
 ((match* (cdr-ignore (or (list (list :date d) (list :time t))
                          (list (list :time t) (list :date d))))
          tokens)
  (do-something d t)))

This works as expected: the `list' patterns expand to check that the car
of the inner list is :date or :time, and bind the corresponding
variables.  However, if I also try to match subsequent list elements in
the tokens, like

(cond*
 ((match* (cdr-ignore (or (list (list :date d :begin db)
                                (list :time t :begin tb))
                          (list (list :time t :begin tb)
                                (list :date d :begin db))))
          tokens)
  (do-something d t db tb)))

then this expands to:

(let ((d15675 tokens))
  (let (ba15678 ba15677 ba15676)
    (if (or (progn
              (setq ba15676 nil)
              (setq ba15677 nil)
              (setq ba15678 nil))
            (progn
              (setq ba15678 nil)
              (setq ba15676 nil)
              (setq ba15677 nil)))
        (let* ((d ba15676)
               (db ba15677)
               (tb ba15678))
          (do-something d t db tb))
      nil)))

which simply always returns nil.  I suspect the problem is in the
disjunction pattern handling in `cond*-subpat', where there is a comment
that says:

 ;; The main complexity is unsetting the pattern variables
 ;; that tentatively match in an or-branch that later failed.

The `progn' form which is setting all the bindings to nil is expanded
from `(progn ,@clearing) a little ways below that comment.  It looks to
me like this form is maybe missing a reference to `expression', or
perhaps should be part of a larger form that contains `expression'.  Or
am I misunderstanding something?

Thanks!  Here's the rest of the report-emacs-bug info:

In GNU Emacs 31.0.50 (build 12, x86_64-pc-linux-gnu, GTK+ Version
 3.24.38, cairo version 1.16.0) of 2025-12-22 built on ohm
Repository revision: b185d093e0feab89cdbcebb4a4bf74222144296b
Repository branch: scratch/icalendar
Windowing system distributor 'The X.Org Foundation', version 11.0.12201009
System Description: Debian GNU/Linux 12 (bookworm)

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG
LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG SECCOMP SOUND
SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XINERAMA
XINPUT2 XPM XRANDR GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  recentf-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  server-mode: t
  override-global-mode: t
  global-evil-surround-mode: t
  evil-surround-mode: t
  evil-mode: t
  evil-local-mode: t
  ivy-mode: t
  electric-pair-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-nonselected-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/rwl/.emacs.d/elpa/magit-4.1.0/magit-autorevert hides /home/rwl/.emacs.d/elpa/magit-section-4.1.0/magit-autorevert
/home/rwl/.emacs.d/elpa/lua-mode-20231023.947/lua-mode hides /home/rwl/src/emacs/lisp/progmodes/lua-mode

Features:
(shadow emacsbug lisp-mnt smiley gnus-cite gnus-async gnus-bcklg
gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp gnus-ml
gnus-msg nndoc gnus-cache gnus-dup display-line-numbers debbugs-gnu
debbugs soap-client rng-xsd xsd-regexp debbugs-compat woman man pulse
descr-text propose-time calc-undo calc-misc whitespace network-stream
url-cache cond-star help-macro elfeed-link elfeed-show elfeed-search
elfeed-csv elfeed elfeed-curl elfeed-log xml-query elfeed-db elfeed-lib
gnus-icalendar-tests gnus-icalendar org-capture epa-file calc-alg
em-unix em-term term disp-table ehelp em-script em-prompt em-pred em-ls
em-hist em-glob em-extpipe em-cmpl em-dirs em-basic em-banner em-alias
esh-mode esh-var calc-arith calc-map calc-stat calc-vec calc-ext
calc-menu calc-aent calc calc-loaddefs calc-macs tex-mode cal-julian
lunar solar let-alist cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs textsec uni-scripts
idna-mapping ucs-normalize uni-confusable textsec-check qp sort flyspell
orgalist magit-patch cus-edit cus-load texinfo texinfo-loaddefs ert-x
novice thai-util thai-word git-rebase icalendar-mode ol-eww eww vtable
url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect
gnus-art mm-uu mml2015 gnus-sum shr pixel-fill kinsoku url-file svg dom
gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud nnimap nnmail
mail-source utf7 nnoo gnus-spec gnus-int gnus-range gnus-win gnus
nnheader range ol-docview doc-view jka-compr image-mode exif ol-bibtex
bibtex ol-bbdb ol-w3m ol-doi org-link-doi tabify cal-move ledger-mode
ledger-check ledger-texi ledger-test ledger-sort ledger-report
ledger-reconcile ledger-occur ledger-fonts ledger-fontify ledger-state
ledger-complete ledger-schedule ledger-xact ledger-post ledger-exec
ledger-init ledger-navigate eshell esh-cmd esh-ext esh-proc esh-opt
esh-io esh-arg esh-module esh-module-loaddefs esh-util ledger-context
ledger-commodities ledger-regex cua-base cl-print copyright mm-archive
grep mule-util ert ewoc debug backtrace mail-extr dired-aux vc
magit-extras face-remap recentf tree-widget magit-bookmark bookmark
icalendar-macs tramp-sh shortdoc comp-common help-fns radix-tree
misearch multi-isearch vc-git vc-dispatcher bug-reference ffap
tramp-cache time-stamp tramp trampver tramp-integration files-x
tramp-message tramp-compat tramp-loaddefs warnings ediff ediff-merg
ediff-mult ediff-wind ediff-diff ediff-help ediff-init ediff-util
magit-submodule magit-blame magit-stash magit-reflog magit-bisect
magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit
magit-sequence magit-notes magit-worktree magit-tag magit-merge
magit-branch magit-reset magit-files magit-refs magit-status magit
magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff
smerge-mode diff git-commit log-edit pcvs-util add-log magit-core
magit-autorevert autorevert filenotify magit-margin magit-transient
magit-process with-editor server magit-mode transient benchmark
magit-git magit-base magit-section cursor-sensor dash two-column ob-R
ob-python python ob-shell shell org-caldav url-dav parse-time iso8601
url-http url-auth url-gw nsm xml ox-odt rng-loc rng-uri rng-parse
rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok
nxml-util ox-latex ox-icalendar ox-html table ox-ascii ox-publish ox
org-attach org-agenda org-element org-persist org-id avl-tree generator
org-refile ol-notmuch notmuch notmuch-tree notmuch-jump notmuch-hello
wid-edit notmuch-show notmuch-print notmuch-crypto notmuch-mua
notmuch-message notmuch-draft notmuch-maildir-fcc notmuch-address
notmuch-company notmuch-parser notmuch-wash diff-mode track-changes
coolj goto-addr notmuch-tag crm notmuch-lib notmuch-compat hl-line
message sendmail yank-media rfc822 mml mailabbrev mail-utils gmm-utils
mailheader mm-view mml-smime mml-sec gnus-util smime gnutls puny dig
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr compat org ob ob-tangle ob-ref ob-lob ob-table
ob-exp org-macro org-src sh-script smie treesit executable ob-comint
org-pcomplete pcomplete org-list org-footnote org-faces org-entities
noutline outline org-version ob-emacs-lisp ob-core ob-eval org-cycle
org-table ol org-fold org-fold-core org-keys oc org-loaddefs find-func
org-compat use-package-bind-key bind-key easy-mmode evil-surround evil
evil-keybindings evil-integration evil-maps evil-commands reveal
evil-jumps evil-command-window evil-types evil-search evil-ex
evil-macros evil-repeat evil-states evil-core evil-common thingatpt rect
evil-vars edmacro kmacro diary-icalendar pp cal-dst icalendar-recur
icalendar-utils icalendar-parser time-date icalendar-ast org-element-ast
inline org-macs format-spec icalendar diary-lib diary-loaddefs skeleton
cal-menu calendar cal-loaddefs epa derived epg rfc6068 epg-config advice
counsel xref project dired dired-loaddefs compile text-property-search
comint ansi-osc ansi-color swiper ivy delsel ring ivy-faces ivy-overlay
colir elec-pair ispell rx solarized-dark-theme solarized-theme solarized
solarized-faces color cl-extra help-mode use-package-ensure
use-package-core finder-inf calfw-autoloads calfw-ical-autoloads
counsel-autoloads debbugs-autoloads elfeed-autoloads
evil-surround-autoloads evil-autoloads gnu-elpa-keyring-update-autoloads
goto-chg-autoloads howm-autoloads ledger-mode-autoloads
lua-mode-autoloads magit-autoloads pcase magit-section-autoloads
dash-autoloads markdown-mode-autoloads ol-notmuch-autoloads
notmuch-autoloads org-caldav-autoloads solarized-theme-autoloads
swiper-autoloads ivy-autoloads info with-editor-autoloads xr-autoloads
yaml-mode-autoloads package browse-url xdg url url-proxy url-privacy
url-expand url-methods url-history url-cookie generate-lisp-file
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs icons password-cache json subr-x map byte-opt
gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl
tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
touch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list
replace newcomment text-mode lisp-mode prog-mode register page tab-bar
menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse
jit-lock font-lock syntax font-core term/tty-colors frame minibuffer
nadvice seq simple cl-generic indonesian philippine cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop
case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar
make-network-process tty-child-frames emacs)

Memory information:
((conses 16 2456394 674674) (symbols 48 64136 2)
 (strings 32 265404 32661) (string-bytes 1 65454423)
 (vectors 16 173126) (vector-slots 8 2444619 307649)
 (floats 8 1449 3766) (intervals 56 146348 12559) (buffers 984 139))




Acknowledgement sent to Richard Lawrence <rwl@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#80121; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 17 Jan 2026 12:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.