bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19564: 24.4; eieio backward compatibility


From: Thierry Volpiatto
Subject: bug#19564: 24.4; eieio backward compatibility
Date: Tue, 13 Jan 2015 19:06:34 +0100

Stefan Monnier <address@hidden> writes:

>>> That doesn't explain to me *why* it needs it.
>>> Why does Helm need to know the initarg of a slot?
>> Helm needs to know the value of each slot in class to convert it to
>> alist.
>
> But the initarg is not the slot, so that doesn't explain why you need
> the initargs?

The confusion comes that slot-value as documented should use the quoted
slot (i.e 'slot) and oref should use the keyword slot (i.e :slot).
As I was using oref in first place, I was converting the quoted slot to
the keyword slot (i.e 'slot => :slot) to pass it to oref, but since I
use slot-value this is no more needed and I can get rid of this
conversion with class-slot-initarg.
Note that it seems the documentation should be updated as slot-value
support both form for slot ('slot and :slot), and IIRC oref also support
both forms, but correct me if I am wrong, I am not sure about this one,
I will check.

> As exlained in bug#19552, EIEIO's use of namespaces and
> internal/external definitions was terribly messy (and it's still far
> from ideal), so you were left having to guess whether you were allowed
> to use something.

Yes I know, fixing all namespaces is good even if it create some
annoyances at first for us writing external packages.

> Indeed.  I can add an obsolete backward-compatible definition to handle
> that, but I'd first like to better understand why it was used: maybe it
> shouldn't be declared internal after all.

As explained above it was just used to convert 'slot to :slot but well,
as we can use slot-value... but one may want to use oref and use :slot,
so it needs a way to convert this (maybe there is something else though,
enlight me).

> Files compiled with Emacs-25 are indeed not expected to work on
> Emacs-24,

Yes you already told me this long time ago.

> but the other way should work

Yes but it doesn't.

> (tho some of the changes in EIEIO aren't backward compatible at their
> core, but so far those seemed not to affect existing .elc files), so
> if it doesn't please M-x report-emacs-bug, so we can see if/how we can
> fix it.

Ok I will in next bugreport.

Thanks for working on this.

-- 
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]