]> git.eshelyaron.com Git - emacs.git/commitdiff
Clarify docstring of pcase-exhaustive
authorStefan Kangas <stefan@marxist.se>
Sun, 19 Sep 2021 15:25:39 +0000 (17:25 +0200)
committerStefan Kangas <stefan@marxist.se>
Sun, 19 Sep 2021 15:25:39 +0000 (17:25 +0200)
* lisp/emacs-lisp/pcase.el (pcase-exhaustive): Clarify docstring
by contrasting with pcase.  (Bug#44166)

lisp/emacs-lisp/pcase.el

index c6173c710f775174771de1a1dfb08572b322216e..a3498d2da8d62b390301a398a17c177c0aa6a307 100644 (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)))