Subject: Re: bug#50777: Dropping EIEIO from xref (for performance)

From: Mattias Engdegård <[email-masked]>
Date: Sun, 26 Sep 2021 10:51:12 +0200

26 sep. 2021 kl. 03.15 skrev Dmitry Gutov <[email-masked]>:

>  (void-function make-closure)
> 
> was a much bigger problem. This is apparently how lambdas are compiled now.

There are no circumstances under which Emacs 28 bytecode is guaranteed to work in earlier Emacs versions: there is backward but no forward compatibility. For example, any code using `with-temp-buffer` won't work, nor as you noticed anything creating closures.

This is unavoidable and the alternative would be much worse, but it's sometimes annoying when testing code with different versions and (in particular) installing packages using a new version and then using an old one.

Could we arrange the .el file to be used if the .elc is built with a newer Emacs version? (Perversely, it would make some inlined functions faster...)

An alternative would be to segregate installed packages by (major) version, so that ~/.emacs.d/ has separate installations for Emacs 26, 27, 28 and so on.