]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/eieio-core.el (class-p): Accept class objects
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 12 Sep 2015 00:30:31 +0000 (20:30 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 12 Sep 2015 00:30:31 +0000 (20:30 -0400)
lisp/emacs-lisp/eieio-core.el

index 29c4467b304e2fb9f01e85af210ed06b368859fc..f97667c3689ab40cb7e87a62e3b306c22fce12e1 100644 (file)
@@ -135,10 +135,10 @@ Currently under control of this var:
       (or (cl--find-class class) class)
     class))
 
-(defun class-p (class)
-  "Return non-nil if CLASS is a valid class vector.
-CLASS is a symbol."                     ;FIXME: Is it a vector or a symbol?
-  (and (symbolp class) (eieio--class-p (cl--find-class class))))
+(defun class-p (x)
+  "Return non-nil if X is a valid class vector.
+X can also be is a symbol."
+  (eieio--class-p (if (symbolp x) (cl--find-class x) x)))
 
 (defun eieio--class-print-name (class)
   "Return a printed representation of CLASS."