emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] feature/gnus-select 6e30330 041/218: Clarify that nil does


From: Andrew G Cohen
Subject: [Emacs-diffs] feature/gnus-select 6e30330 041/218: Clarify that nil doesn't match itself as a cl-case clause (Bug#30749)
Date: Fri, 14 Dec 2018 03:34:52 -0500 (EST)

branch: feature/gnus-select
commit 6e30330f47d8c2903f88df72ebe6aaad4a5bbbd0
Author: Noam Postavsky <address@hidden>
Commit: Andrew G Cohen <address@hidden>

    Clarify that nil doesn't match itself as a cl-case clause (Bug#30749)
    
    * lisp/emacs-lisp/cl-macs.el (cl-case): Mention that the ATOM
    => (ATOM) short form is only for non-nil ATOMs.
---
 lisp/emacs-lisp/cl-macs.el | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 4d4640c..9600230 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -771,13 +771,15 @@ The result of the body appears to the compiler as a 
quoted constant."
 ;;;###autoload
 (defmacro cl-case (expr &rest clauses)
   "Eval EXPR and choose among clauses on that value.
-Each clause looks like (KEYLIST BODY...).  EXPR is evaluated and compared
-against each key in each KEYLIST; the corresponding BODY is evaluated.
-If no clause succeeds, cl-case returns nil.  A single atom may be used in
-place of a KEYLIST of one atom.  A KEYLIST of t or `otherwise' is
-allowed only in the final clause, and matches if no other keys match.
-Key values are compared by `eql'.
-\n(fn EXPR (KEYLIST BODY...)...)"
+Each clause looks like (KEYLIST BODY...).  EXPR is evaluated and
+compared against each key in each KEYLIST; the corresponding BODY
+is evaluated.  If no clause succeeds, cl-case returns nil.  A
+single non-nil atom may be used in place of a KEYLIST of one
+atom.  A KEYLIST of t or `otherwise' is allowed only in the final
+clause, and matches if no other keys match.  Key values are
+compared by `eql'.
+
+\(fn EXPR (KEYLIST BODY...)...)"
   (declare (indent 1) (debug (form &rest (sexp body))))
   (macroexp-let2 macroexp-copyable-p temp expr
     (let* ((head-list nil))



reply via email to

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