]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/oclosure.el (oclosure): Make it a subtype of `function`
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 7 Mar 2024 20:26:12 +0000 (15:26 -0500)
committerEshel Yaron <me@eshelyaron.com>
Mon, 11 Mar 2024 09:16:37 +0000 (10:16 +0100)
(cherry picked from commit 76e9c761a45e0157a8ca43eaaf928385d8e0c228)

lisp/emacs-lisp/oclosure.el

index 26cd8594dfc400d97ed4896761617e5fd71e8fda..977d5735171d5e507abe9feaf21035ac7895c081 100644 (file)
                (: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))))