[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Warning on files byte-compiled with different versions
From: |
Andreas Schwab |
Subject: |
Re: Warning on files byte-compiled with different versions |
Date: |
Sun, 14 Feb 2016 16:02:29 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
>> So, the answer is no, AFAICT. Second question, is there any reason why
>> this kind of functionality could not be added?
>
> Indeed. The byte-compiler could simply emit
>
> `(if (< emacs-major-version ,emacs-major-version)
> (message "This file was compiled for a more recent Emacs"))
>
> at the beginning of every file. IIRC we used to do something like that.
We have the bytecode version encoded in the header, and a check if it
contains multi-byte characters. Just because the file was compiled by a
later version should not be a reason to prevent loading it, only if the
format itself changes.
Andreas.
--
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."