]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bugs in eieio-oref-default related to class symbols
authorStephen Leake <stephen_leake@stephe-leake.org>
Sun, 13 Sep 2015 13:59:07 +0000 (08:59 -0500)
committerStephen Leake <stephen_leake@stephe-leake.org>
Tue, 15 Sep 2015 19:44:43 +0000 (14:44 -0500)
* lisp/emacs-lisp/eieio-core.el (class-p): Handle symbol properly.
(eieio-oref-default): Handle class properly.

lisp/emacs-lisp/eieio-core.el

index f97667c3689ab40cb7e87a62e3b306c22fce12e1..e3f7b11bb64c64c08736c3ad972be68f2b9a44cd 100644 (file)
@@ -769,7 +769,8 @@ Fills in OBJ's SLOT with its default value."
   (cl-check-type obj (or eieio-object class))
   (cl-check-type slot symbol)
   (let* ((cl (cond ((symbolp obj) (cl--find-class obj))
-                   (t (eieio--object-class obj))))
+                   ((eieio-object-p obj) (eieio--object-class obj))
+                   (t obj)))
         (c (eieio--slot-name-index cl slot)))
     (if (not c)
        ;; It might be missing because it is a :class allocated slot.