GNU bug report logs - #68509
30.0.50; pcase-dolist matches backquote pattern incorrectly

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> posteo.net>

Date: Tue, 16 Jan 2024 15:06:01 UTC

Severity: normal

Found in version 30.0.50

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ihor Radchenko <yantar92 <at> posteo.net>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: jporterbugs <at> gmail.com, 68509 <at> debbugs.gnu.org
Subject: bug#68509: 30.0.50; pcase-dolist matches backquote pattern incorrectly
Date: Mon, 19 Feb 2024 14:59:09 +0200
> Cc: 68509 <at> debbugs.gnu.org
> From: Ihor Radchenko <yantar92 <at> posteo.net>
> Date: Mon, 19 Feb 2024 10:05:33 +0000
> 
> Ihor Radchenko <yantar92 <at> posteo.net> writes:
> 
> > Not sure about pcase-let, but pcase-dolist specifically may be
> > simplified not to use pcase-let:
> >
> > (if (pcase--trivial-upat-p (car spec))
> >       `(dolist ,spec ,@body)
> >     (let ((tmpvar (gensym "x")))
> >       `(dolist (,tmpvar ,@(cdr spec))
> >          (pcase ,tmpvar (,(car spec) ,@body)))))
> 
> See the attached patch.
> If the patch is acceptable, we also need to update the manual.

Thanks.  Adding Stefan to the discussion.




This bug report was last modified 1 year and 113 days ago.

Previous Next


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