diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2024-03-12 08:48:09 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2024-03-12 08:48:09 -0400 |
commit | d5773276fb1671da619eeee2c316098d6b1c25c4 (patch) | |
tree | ef49801eb999dd62db76f60d1b2cee6bbe73c3a5 /lisp/emacs-lisp/comp.el | |
parent | 3ed5777fa732123e8bf630293020f9d1766694b7 (diff) | |
download | emacs-d5773276fb1671da619eeee2c316098d6b1c25c4.tar.gz emacs-d5773276fb1671da619eeee2c316098d6b1c25c4.tar.bz2 emacs-d5773276fb1671da619eeee2c316098d6b1c25c4.zip |
(comp-known-predicates): Fix overly optimistic `functionp`
* lisp/emacs-lisp/comp.el (comp-known-predicates): `functionp` can also
be true for `cons` objects.
Diffstat (limited to 'lisp/emacs-lisp/comp.el')
-rw-r--r-- | lisp/emacs-lisp/comp.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 21e2bb01ed0..9c2182092cb 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -202,7 +202,7 @@ Useful to hook into pass checkers.") (consp . cons) (floatp . float) (framep . frame) - (functionp . (or function symbol)) + (functionp . (or function symbol cons)) (hash-table-p . hash-table) (integer-or-marker-p . integer-or-marker) (integerp . integer) @@ -244,6 +244,7 @@ Useful to hook into pass checkers.") (defun comp--pred-to-cstr (predicate) "Given PREDICATE, return the corresponding constraint." + ;; FIXME: Unify those two hash tables? (or (gethash predicate comp-known-predicates-h) (gethash predicate (comp-cstr-ctxt-pred-type-h comp-ctxt)))) |