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

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

bug#44166: pcase-exhaustive doc string could be more didactic


From: Stefan Kangas
Subject: bug#44166: pcase-exhaustive doc string could be more didactic
Date: Sun, 19 Sep 2021 08:34:16 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

tags 44166 + fixed
close 44166 28.1
thanks

Stefan Kangas <stefan@marxist.se> writes:

> The doc string of `pcase-exhaustive' could be more didactic.  It says:
>
>     pcase-exhaustive is a Lisp macro in ‘pcase.el’.
>
>     (pcase-exhaustive EXP &rest CASES)
>
>     The exhaustive version of ‘pcase’ (which see).
>     If EXP fails to match any of the patterns in CASES, an error is signaled.
>
>>From reading the code, I understand that this is the same as pcase, but
> signals an error if there is no match?  If this is correct, may I
> suggest to amend the doc string as follows?
>
>     The exhaustive version of ‘pcase’ (which see).
>     If EXP fails to match any of the patterns in CASES, an error is
>     signaled.
>     In contrast, `pcase' will only return nil if there is no match.

There have been no comments here within a year, so I've now pushed a
change like this to master (commit 86837a87b7).

> Also, should it be added to the ELisp manual?

I guess not.  Closing this bug.





reply via email to

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