GNU bug report logs - #20491
25.0.50; new eieio-oref implementation

Previous Next

Package: emacs;

Reported by: Pierre Lorenzon <devel <at> pollock-nageoire.net>

Date: Sun, 3 May 2015 05:39:02 UTC

Severity: normal

Found in version 25.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 20491 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Pierre Lorenzon <devel <at> pollock-nageoire.net>
Cc: zappo <at> gnu.org, 20491 <at> debbugs.gnu.org
Subject: Re: bug#20491: 25.0.50; new eieio-oref implementation
Date: Sun, 03 May 2015 21:44:33 -0400
>   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)




This bug report was last modified 10 years and 17 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.