From: Stefan Monnier Date: Sat, 12 Sep 2015 00:30:31 +0000 (-0400) Subject: * lisp/emacs-lisp/eieio-core.el (class-p): Accept class objects X-Git-Tag: emacs-25.0.90~1224^2~150 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b2615c753ba9b332b4062b3aef1bf96b57c18215;p=emacs.git * lisp/emacs-lisp/eieio-core.el (class-p): Accept class objects --- diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el index 29c4467b304..f97667c3689 100644 --- a/lisp/emacs-lisp/eieio-core.el +++ b/lisp/emacs-lisp/eieio-core.el @@ -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."