emacs-devel
[Top][All Lists]
Advanced

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

Checking the version of Emacs that an ELisp file was compiled with [WAS:


From: Clément Pit-Claudel
Subject: Checking the version of Emacs that an ELisp file was compiled with [WAS: Re: User-defined record types, v3]
Date: Tue, 4 Apr 2017 08:48:11 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 2017-04-04 08:32, Lars Brinkhoff wrote:
> I haven't looked to see if there's a ready-made function for this.  The
> code in src/lread.c just looks at the fourth byte of the first line.
> Then it checks that a certain regexp is present near the beginning of
> the file.

Thanks! I can't find such a function on the ELisp side, indeed.  Maybe it would 
be nice to have one.
My current strategy is to have a "canary": an ELisp file that just records the 
Emacs version that compiled it (using eval-when-compile).  Loading that file 
then allows me to read that version and decides whether I need to recompile the 
other files.  It'd be nicer to be able to do away with that.

Clément.



reply via email to

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