[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#20491: 25.0.50; new eieio-oref implementation
From: |
Pierre Lorenzon |
Subject: |
bug#20491: 25.0.50; new eieio-oref implementation |
Date: |
Wed, 06 May 2015 09:19:24 +0200 (CEST) |
Hi,
From: Stefan Monnier <monnier@iro.umontreal.ca>
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)
In fact it corrects the problem but maybe I did not
tell you and that's why you did not install this
change in the git repo. I cloned it today.
Pierre