[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#20491: 25.0.50; new eieio-oref implementation
From: |
Stefan Monnier |
Subject: |
bug#20491: 25.0.50; new eieio-oref implementation |
Date: |
Sun, 03 May 2015 21:44:33 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> error("eieio-oref called on a class!")
> eieio-oref(srecode-template-inserter-section-end key)
> srecode-compile-inserter("INDENT" "\n"
Does the patch below fix this problem?
AFAICT, the use of `oref' with a class object was never documented as
a supported feature of EIEIO. You're supposed to use oref-default for that.
Stefan
diff --git a/lisp/cedet/srecode/compile.el b/lisp/cedet/srecode/compile.el
index c93a6f7..763c462 100644
--- a/lisp/cedet/srecode/compile.el
+++ b/lisp/cedet/srecode/compile.el
@@ -523,7 +523,7 @@ to the inserter constructor."
(setq classes (append classes (eieio-class-children (car classes))))
;; Do we have a match?
(when (and (not (class-abstract-p (car classes)))
- (equal (oref (car classes) key) key))
+ (equal (oref-default (car classes) key) key))
;; Create the new class, and apply state.
(setq new (apply (car classes) name props))
(srecode-inserter-apply-state new STATE)