diff options
author | Stefan Kangas <stefan@marxist.se> | 2021-09-19 17:25:39 +0200 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2021-09-19 17:25:39 +0200 |
commit | 86837a87b7acc04814ec126d00cd3ef095de3012 (patch) | |
tree | fd068e9b80d15a3f18709f85606697b0a1620388 /lisp/emacs-lisp | |
parent | 7b3f02de12112b32f9c51b08cb6a947f167a3b03 (diff) | |
download | emacs-86837a87b7acc04814ec126d00cd3ef095de3012.tar.gz emacs-86837a87b7acc04814ec126d00cd3ef095de3012.tar.bz2 emacs-86837a87b7acc04814ec126d00cd3ef095de3012.zip |
Clarify docstring of pcase-exhaustive
* lisp/emacs-lisp/pcase.el (pcase-exhaustive): Clarify docstring
by contrasting with pcase. (Bug#44166)
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/pcase.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index c6173c710f7..a3498d2da8d 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el @@ -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))) |