diff options
| author | Noam Postavsky | 2018-03-31 00:40:43 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2018-03-31 00:50:37 -0400 |
| commit | e50196e8a96216f1fd69f9257cddd8d76ad2ac78 (patch) | |
| tree | 0cc120b6a633ce87db822016922c1df4976f2f65 /doc | |
| parent | 8a2466ff7240136c32b1cc21143225935d462cc6 (diff) | |
| download | emacs-e50196e8a96216f1fd69f9257cddd8d76ad2ac78.tar.gz emacs-e50196e8a96216f1fd69f9257cddd8d76ad2ac78.zip | |
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.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/control.texi | 3 |
1 files changed, 2 insertions, 1 deletions
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{})}. | |||
| 317 | @var{pattern} of each clause, in textual order. If the value matches, | 317 | @var{pattern} of each clause, in textual order. If the value matches, |
| 318 | the clause succeeds; @code{pcase} then evaluates its @var{body-forms}, | 318 | the clause succeeds; @code{pcase} then evaluates its @var{body-forms}, |
| 319 | and returns the value of the last of @var{body-forms}. Any remaining | 319 | and returns the value of the last of @var{body-forms}. Any remaining |
| 320 | @var{clauses} are ignored. | 320 | @var{clauses} are ignored. If no clauses match, then the @code{pcase} |
| 321 | form evaluates to @code{nil}. | ||
| 321 | 322 | ||
| 322 | The @var{pattern} part of a clause can be of one of two types: | 323 | The @var{pattern} part of a clause can be of one of two types: |
| 323 | @dfn{QPattern}, a pattern quoted with a backquote; or a | 324 | @dfn{QPattern}, a pattern quoted with a backquote; or a |