From e50196e8a96216f1fd69f9257cddd8d76ad2ac78 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sat, 31 Mar 2018 00:40:43 -0400 Subject: Document return value of pcase (Bug#30425) * doc/lispref/control.texi (Pattern matching case statement): * lisp/emacs-lisp/pcase.el (pcase): State that pcase returns nil if no patterns match. (pcase-exhaustive): State that an error is signaled if no patterns match. --- doc/lispref/control.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi index f85ee947790..adec632da6a 100644 --- a/doc/lispref/control.texi +++ b/doc/lispref/control.texi @@ -317,7 +317,8 @@ list of the form @code{(@var{pattern} @var{body-forms}@dots{})}. @var{pattern} of each clause, in textual order. If the value matches, the clause succeeds; @code{pcase} then evaluates its @var{body-forms}, and returns the value of the last of @var{body-forms}. Any remaining -@var{clauses} are ignored. +@var{clauses} are ignored. If no clauses match, then the @code{pcase} +form evaluates to @code{nil}. The @var{pattern} part of a clause can be of one of two types: @dfn{QPattern}, a pattern quoted with a backquote; or a -- cgit v1.2.1