"Martin" == Martin Buchholz <martin(a)xemacs.org> writes:
Martin> Adding version information to the .elc file is an excellent
Martin> idea. Using the emacs version number would not be enough,
Martin> because different emacsen with the same version number might
Martin> have incompatible bytecodes.
The Emacs version number might not be sufficient, but it could be useful in any
case.
This is maybe drifting off-topic, but the discussion reminded me of the
`emacs-vers.el' package that I wrote many moons ago. It has the ability to
evaluate Emacs version predicates at byte-compile time. One advantage of this
is that one can avoid byte-compiler warnings that arise merely from cross-Emacs
and cross-version compatibility code.
A problem with the existing package, however, is that there is nowhere in the
`.elc' to put the compile-time assumptions. I could have further hacked the
byte-compiler myself, but I didn't.
What I would have liked was a standard byte-compiler hook in which one could
specify load-time predicates to verify compile-time assumptions. This is more
than what is needed to check for byte-code compatibility, but if you're going
to muck about in that part of the compiler anyway, why not make a hook for
program specializers?
Like I said, probably drifting off topic.
Eric.
PS --- <
http://www.cs.utah.edu/~eeide/emacs/emacs-vers.el.gz>
--
-------------------------------------------------------------------------------
Eric Eide <eeide(a)cs.utah.edu> . University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX