]> git.eshelyaron.com Git - emacs.git/commitdiff
; Add two comments on comp-known-predicates cl-deftype-satisfies
authorAndrea Corallo <acorallo@gnu.org>
Wed, 21 Feb 2024 14:45:40 +0000 (15:45 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 28 Feb 2024 17:38:30 +0000 (18:38 +0100)
* lisp/emacs-lisp/comp.el (comp-known-predicates): Add comment.
* lisp/emacs-lisp/cl-macs.el: Likewise.

(cherry picked from commit 88abbf00af69cf7e5f36e318e6935f7d1500af7f)

lisp/emacs-lisp/cl-macs.el
lisp/emacs-lisp/comp.el

index 06a09885c88d2e3453058d0adf0027e3c33e3ca4..44ebadeebff267140b9088ab88229c5443c0f14b 100644 (file)
@@ -3460,6 +3460,7 @@ Of course, we really can't know that for sure, so it's just a heuristic."
            (or (cdr (assq sym byte-compile-function-environment))
                (cdr (assq sym macroexpand-all-environment))))))
 
+;; Please keep it in sync with `comp-known-predicates'.
 (pcase-dolist (`(,type . ,pred)
                ;; Mostly kept in alphabetical order.
                '((array                . arrayp)
index a833bf5bfc4f8e149901e8a988ac37d0e67dca85..46d2896f2be8f84414d994e4658677f4538d4d74 100644 (file)
@@ -188,6 +188,9 @@ Useful to hook into pass checkers.")
    finally return h)
   "Hash table function -> `comp-constraint'.")
 
+;; Keep it in sync with the `cl-deftype-satisfies' property set in
+;; cl-macs.el. We can't use `cl-deftype-satisfies' directly as the
+;; relation type <-> predicate is not bijective (bug#45576).
 (defconst comp-known-predicates
   '((arrayp              . array)
     (atom               . atom)