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: Thu, 22 Oct 2020 20:30:41 -0700

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.

Also, should it be added to the ELisp manual?





reply via email to

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