GNU bug report logs - #71503
30.0.50; pcase-lambda (with "and" and "guard") does not work as expected

Previous Next

Package: emacs;

Reported by: Mekeor Melire <mekeor <at> posteo.de>

Date: Wed, 12 Jun 2024 08:42:01 UTC

Severity: normal

Found in version 30.0.50

Done: Philip Kaludercic <philipk <at> posteo.net>

Bug is archived. No further changes may be made.

Full log


Message #38 received at 71503 <at> debbugs.gnu.org (full text, mbox):

From: Mekeor Melire <mekeor <at> posteo.de>
To: 71503 <at> debbugs.gnu.org
Cc: Philip Kaludercic <philipk <at> posteo.net>, Eli Zaretskii <eliz <at> gnu.org>,
 monnier <at> iro.umontreal.ca
Subject: Re: bug#71503: 30.0.50; pcase-lambda (with "and" and "guard") does
 not work as expected
Date: Sun, 21 Jul 2024 13:33:18 +0000
2024-07-21 11:17 philipk <at> posteo.net:

> What do you think of:

>    "Like `lambda' but allow each argument to be a pattern.
> -I.e. accepts the usual &optional and &rest keywords, but every
> -formal argument can be any pattern accepted by `pcase' (a mere
> -variable name being but a special case of it)."
> +I.e. accepts the usual &optional and &rest keywords, but every formal
> +argument can be any pattern destructed by `pcase-let' (a mere variable
> +name being but a special case of it).
> +
> +Each argument should match its respective pattern in the parameter
> +list (i.e. be of a compatible structure); a mismatch may signal an error
> +or may go undetected, binding arguments to arbitrary values, such as
> +nil."
>    (declare (doc-string 2) (indent defun)
>             (debug (&define (&rest pcase-PAT) lambda-doc def-body)))
>    (let* ((bindings ())

Being the submitter of this bug-report, this suggested change would
indeed fix the problem for me and would avoid confusion.  I thus support
this change and thank y'all for your efforts.




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

Previous Next


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