emacs-devel
[Top][All Lists]
Advanced

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

[Patch] byte-compile-insert-header


From: Ulrich Mueller
Subject: [Patch] byte-compile-insert-header
Date: Wed, 9 Dec 2009 06:16:42 +0100

[I had already sent this to Glenn directly, who didn't answer.
Re-sending to the list, so maybe it can still make it for the
pretest.]

Byte-compiled files contain (since Emacs 19 or so) the Emacs version
information. So far, the version had always been on a line by itself,
like: 

   ;;; in Emacs version 23.1.1

Gentoo uses an automated script to determine if an elisp package has
to be recompiled for a new Emacs version. For this, we parse the
header of the *.elc files to determine which Emacs version has
compiled the file.

Unfortunately, this change to bytecomp.el from about one month ago:
<http://cvs.savannah.gnu.org/viewvc/emacs/lisp/emacs-lisp/bytecomp.el?root=emacs&r1=2.271&r2=2.272>
breaks our parser.

We could of course change the regexps in our parser, but that won't
help for existing users' installations.

Therefore I'd like to ask you if the patch included below could be
applied? It restores the previous behaviour that the Emacs version was
on a line by itself.

(It increases the size of byte-compiled files by 3 bytes, but if this
should be an issue, then even more could be saved by reducing the
number of "ballast semicolons" which is a bit generous.)

Ulrich


2009-12-09  Ulrich Mueller  <address@hidden>

        * emacs-lisp/bytecomp.el (byte-compile-insert-header): Put Emacs
        version information on a line by itself again.

--- lisp/emacs-lisp/bytecomp.el 1 Dec 2009 03:14:05 -0000       2.276
+++ lisp/emacs-lisp/bytecomp.el 6 Dec 2009 23:35:43 -0000
@@ -1894,7 +1894,9 @@
           (concat (user-login-name) "@" (system-name)))
        " on " (current-time-string) "\n"
        ";;; from file " filename "\n"
-       ";;; in Emacs version " emacs-version ", with"
+       ;; Don't change the following line, some people parse it automatically.
+       ";;; in Emacs version " emacs-version "\n"
+       ";;; with"
        (cond
        ((eq optimize 'source) " source-level optimization only")
        ((eq optimize 'byte) " byte-level optimization only")




reply via email to

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