From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#11585: 24.0.50; corrupted byte compiled files Date: Wed, 30 May 2012 11:24:49 -0400 Message-ID: References: <20120530.085706.183065156.devel@pollock-nageoire.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1338391556 28377 80.91.229.3 (30 May 2012 15:25:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 30 May 2012 15:25:56 +0000 (UTC) Cc: 11585@debbugs.gnu.org To: Pierre Lorenzon Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 30 17:25:53 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SZkmV-00061O-7y for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 May 2012 17:25:51 +0200 Original-Received: from localhost ([::1]:44335 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZkmV-0000t1-07 for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 May 2012 11:25:51 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54247) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZkmK-0000qx-1D for bug-gnu-emacs@gnu.org; Wed, 30 May 2012 11:25:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SZkmD-0006eM-Ko for bug-gnu-emacs@gnu.org; Wed, 30 May 2012 11:25:39 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40891) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZkmD-0006eG-Ha for bug-gnu-emacs@gnu.org; Wed, 30 May 2012 11:25:33 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SZkne-0003aO-94 for bug-gnu-emacs@gnu.org; Wed, 30 May 2012 11:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 May 2012 15:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11585-submit@debbugs.gnu.org id=B11585.133839158813744 (code B ref 11585); Wed, 30 May 2012 15:27:02 +0000 Original-Received: (at 11585) by debbugs.gnu.org; 30 May 2012 15:26:28 +0000 Original-Received: from localhost ([127.0.0.1]:50437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SZkn6-0003Zd-3O for submit@debbugs.gnu.org; Wed, 30 May 2012 11:26:28 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:8889) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SZkn4-0003ZP-Co for 11585@debbugs.gnu.org; Wed, 30 May 2012 11:26:26 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09MCpYd/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCwsOJhIUGA0kiBwFugmQRAOjM4FYgwU X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="184196751" Original-Received: from 76-10-150-29.dsl.teksavvy.com (HELO pastel.home) ([76.10.150.29]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 30 May 2012 11:24:51 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id ADFF859284; Wed, 30 May 2012 11:24:49 -0400 (EDT) In-Reply-To: <20120530.085706.183065156.devel@pollock-nageoire.net> (Pierre Lorenzon's message of "Wed, 30 May 2012 08:57:06 +0200 (CEST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:60524 Archived-At: > Certain of my .el files are incorrectly compiled. See the .elc > file with a long name. Duh, indeed it was byte-compile-fix-header, thanks for investigating. I think your patch has the problem that it changes the byte-position of the text in the rest of the buffer, which will break lazy-loaded docstrings and byte-code. Can you try the patch below instead, which will simply report the actual load-file-name rather than file name of the source. Stefan === modified file 'lisp/emacs-lisp/bytecomp.el' --- lisp/emacs-lisp/bytecomp.el 2012-05-30 03:59:42 +0000 +++ lisp/emacs-lisp/bytecomp.el 2012-05-30 15:18:29 +0000 @@ -1937,7 +1937,7 @@ (byte-compile-fix-header byte-compile-current-file)))) byte-compile--outbuffer))) -(defun byte-compile-fix-header (filename) +(defun byte-compile-fix-header (_filename) "If the current buffer has any multibyte characters, insert a version test." (when (< (point-max) (position-bytes (point-max))) (goto-char (point-min)) @@ -1962,11 +1962,8 @@ ;; don't try to check the version number. " (< (aref emacs-version (1- (length emacs-version))) ?A)\n" (format " (string-lessp emacs-version \"%s\")\n" minimum-version) - " (error \"`" - ;; prin1-to-string is used to quote backslashes. - (substring (prin1-to-string (file-name-nondirectory filename)) - 1 -1) - (format "' was compiled for Emacs %s or later\"))\n\n" + " (error \"`%s" + (format "' was compiled for Emacs %s or later\" #$))\n\n" minimum-version)) ;; Now compensate for any change in size, to make sure all ;; positions in the file remain valid. @@ -2037,7 +2034,7 @@ (print-gensym t) (print-circle ; Handle circular data structures. (not byte-compile-disable-print-circle))) - (if (and (memq (car-safe form) '(defun defmacro defvar defvaralias defconst + (if (and (memq (car-safe form) '(defvar defvaralias defconst autoload custom-declare-variable)) (stringp (nth 3 form))) (byte-compile-output-docform nil nil '("\n(" 3 ")") form nil