GNU bug report logs -
#24362
25.1.50; Inconsistent docstring between pcase-let and pcase-let*
Previous Next
Reported by: Chunyang Xu <xuchunyang.me <at> gmail.com>
Date: Sun, 4 Sep 2016 04:27:02 UTC
Severity: minor
Found in version 25.1.50
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Fri, 08 Nov 2019 04:43:45 +0100
with message-id <87a797vxqm.fsf <at> marxist.se>
and subject line Re: bug#24362: 25.1.50; Inconsistent docstring between pcase-let and pcase-let*
has caused the debbugs.gnu.org bug report #24362,
regarding 25.1.50; Inconsistent docstring between pcase-let and pcase-let*
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
24362: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=24362
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
It looks like, to me, the structure of the BODY arg of these two should
be the same (accepting a list froms).
(pcase-let ((a 1))
(incf a)
a)
=> 2
(pcase-let* ((a 1))
(incf a)
a)
=> 2
but the docstrings are using the different words.
(pcase-let BINDINGS &rest BODY)
Like `let' but where you can use `pcase' patterns for bindings.
BODY should be a list of expressions, and BINDINGS should be a list of bindings
^^^^^^^^^^^^^^^^^^^^^
of the form (PAT EXP).
(pcase-let* BINDINGS &rest BODY)
Like `let*' but where you can use `pcase' patterns for bindings.
BODY should be an expression, and BINDINGS should be a list of bindings
^^^^^^^^^^^^^
of the form (PAT EXP).
[Message part 3 (message/rfc822, inline)]
Chunyang Xu <xuchunyang.me <at> gmail.com> writes:
> It looks like, to me, the structure of the BODY arg of these two should
> be the same (accepting a list froms).
>
> (pcase-let ((a 1))
> (incf a)
> a)
> => 2
>
> (pcase-let* ((a 1))
> (incf a)
> a)
> => 2
>
> but the docstrings are using the different words.
>
> (pcase-let BINDINGS &rest BODY)
>
> Like `let' but where you can use `pcase' patterns for bindings.
> BODY should be a list of expressions, and BINDINGS should be a list of bindings
> ^^^^^^^^^^^^^^^^^^^^^
> of the form (PAT EXP).
>
> (pcase-let* BINDINGS &rest BODY)
>
> Like `let*' but where you can use `pcase' patterns for bindings.
> BODY should be an expression, and BINDINGS should be a list of bindings
> ^^^^^^^^^^^^^
> of the form (PAT EXP).
This has been changed on current master to:
Like ‘let*’, but supports destructuring BINDINGS using ‘pcase’ patterns.
As with ‘pcase-let’, BINDINGS are of the form (PATTERN EXP), but the
EXP in each binding in BINDINGS can use the results of the destructuring
bindings that precede it in BINDINGS’ order.
Each EXP should match (i.e. be of compatible structure) to its
respective PATTERN; a mismatch may signal an error or may go
undetected, binding variables to arbitrary values, such as nil.
I'm therefore going to assume that the above is no longer an issue and
close this bug report. If that is incorrect, please reopen.
Best regards,
Stefan Kangas
This bug report was last modified 5 years and 275 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.