From b2615c753ba9b332b4062b3aef1bf96b57c18215 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 11 Sep 2015 20:30:31 -0400 Subject: [PATCH] * lisp/emacs-lisp/eieio-core.el (class-p): Accept class objects --- lisp/emacs-lisp/eieio-core.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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." -- 2.39.2