From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ulrich Mueller Newsgroups: gmane.emacs.devel Subject: [Patch] byte-compile-insert-header Date: Wed, 9 Dec 2009 06:16:42 +0100 Message-ID: <19231.12986.483915.505680@a1i15.kph.uni-mainz.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1260335849 16174 80.91.229.12 (9 Dec 2009 05:17:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Dec 2009 05:17:29 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 09 06:17:22 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NIEvJ-0006BF-9v for ged-emacs-devel@m.gmane.org; Wed, 09 Dec 2009 06:17:13 +0100 Original-Received: from localhost ([127.0.0.1]:58118 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIEvI-0007rR-FO for ged-emacs-devel@m.gmane.org; Wed, 09 Dec 2009 00:17:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NIEvC-0007r8-U8 for emacs-devel@gnu.org; Wed, 09 Dec 2009 00:17:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NIEv8-0007pr-J7 for emacs-devel@gnu.org; Wed, 09 Dec 2009 00:17:06 -0500 Original-Received: from [199.232.76.173] (port=42981 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIEv8-0007pV-6b for emacs-devel@gnu.org; Wed, 09 Dec 2009 00:17:02 -0500 Original-Received: from a1iwww1.kph.uni-mainz.de ([134.93.134.1]:59413) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NIEv6-0002ci-Qu for emacs-devel@gnu.org; Wed, 09 Dec 2009 00:17:01 -0500 Original-Received: from a1i15.kph.uni-mainz.de (a1i15.kph.uni-mainz.de [134.93.134.92]) by a1iwww1.kph.uni-mainz.de (8.14.0/8.13.4) with ESMTP id nB95Gg2U002732 for ; Wed, 9 Dec 2009 06:16:43 +0100 Original-Received: from a1i15.kph.uni-mainz.de (localhost [127.0.0.1]) by a1i15.kph.uni-mainz.de (8.14.3/8.14.2) with ESMTP id nB95GgZ4027657; Wed, 9 Dec 2009 06:16:42 +0100 Original-Received: (from ulm@localhost) by a1i15.kph.uni-mainz.de (8.14.3/8.14.3/Submit) id nB95GgYG027654; Wed, 9 Dec 2009 06:16:42 +0100 X-Mailer: VM 8.0.12 under 23.1.1 (x86_64-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118434 Archived-At: [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: 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 * 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")