1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Clarify docstring of pcase-exhaustive

* lisp/emacs-lisp/pcase.el (pcase-exhaustive): Clarify docstring
by contrasting with pcase.  (Bug#44166)
This commit is contained in:
Stefan Kangas 2021-09-19 17:25:39 +02:00
parent 7b3f02de12
commit 86837a87b7

View file

@ -201,7 +201,11 @@ Emacs Lisp manual for more information and examples."
;;;###autoload
(defmacro 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."
If EXP fails to match any of the patterns in CASES, an error is
signaled.
In contrast, `pcase' will return nil if there is no match, but
not signal an error."
(declare (indent 1) (debug pcase))
(let* ((x (gensym "x"))
(pcase--dontwarn-upats (cons x pcase--dontwarn-upats)))