emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 86837a8: Clarify docstring of pcase-exhaustive


From: Stefan Kangas
Subject: master 86837a8: Clarify docstring of pcase-exhaustive
Date: Sun, 19 Sep 2021 11:27:30 -0400 (EDT)

branch: master
commit 86837a87b7acc04814ec126d00cd3ef095de3012
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Clarify docstring of pcase-exhaustive
    
    * lisp/emacs-lisp/pcase.el (pcase-exhaustive): Clarify docstring
    by contrasting with pcase.  (Bug#44166)
---
 lisp/emacs-lisp/pcase.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
index c6173c7..a3498d2 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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]