mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
(comp-known-predicates): Fix overly optimistic functionp
* lisp/emacs-lisp/comp.el (comp-known-predicates): `functionp` can also be true for `cons` objects.
This commit is contained in:
parent
3ed5777fa7
commit
d5773276fb
1 changed files with 2 additions and 1 deletions
|
|
@ -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))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue