emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24362: closed (25.1.50; Inconsistent docstring between pcase-let and


From: GNU bug Tracking System
Subject: bug#24362: closed (25.1.50; Inconsistent docstring between pcase-let and pcase-let*)
Date: Fri, 08 Nov 2019 03:44:01 +0000

Your message dated Fri, 08 Nov 2019 04:43:45 +0100
with message-id <address@hidden>
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
address@hidden.)


-- 
24362: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=24362
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 25.1.50; Inconsistent docstring between pcase-let and pcase-let* Date: Sun, 04 Sep 2016 12:26:05 +0800
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).



--- End Message ---
--- Begin Message --- Subject: Re: bug#24362: 25.1.50; Inconsistent docstring between pcase-let and pcase-let* Date: Fri, 08 Nov 2019 04:43:45 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
Chunyang Xu <address@hidden> 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


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]