* lisp/emacs-lisp/oclosure.el (oclosure): Make it a subtype of function

This commit is contained in:
Stefan Monnier 2024-03-07 15:26:12 -05:00
parent 4fdcbd09af
commit 76e9c761a4

View file

@ -139,12 +139,15 @@
(:include cl--class)
(:copier nil))
"Metaclass for OClosure classes."
;; The `allparents' slot is used for the predicate that checks if a given
;; object is an OClosure of a particular type.
(allparents nil :read-only t :type (list-of symbol)))
(setf (cl--find-class 'oclosure)
(oclosure--class-make 'oclosure
"The root parent of all OClosure classes"
nil nil '(oclosure)))
"The root parent of all OClosure types"
nil (list (cl--find-class 'function))
'(oclosure)))
(defun oclosure--p (oclosure)
(not (not (oclosure-type oclosure))))