From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Brown Newsgroups: gmane.emacs.devel Subject: Re: Expansion of #$ in byte-compiled files Date: Thu, 3 Sep 2015 17:14:46 -0400 Message-ID: <55E8B846.6030307@cornell.edu> References: <1668732705.1162011.1441310007202.JavaMail.yahoo@mail.yahoo.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1441314926 11206 80.91.229.3 (3 Sep 2015 21:15:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Sep 2015 21:15:26 +0000 (UTC) To: Michael Mauger , Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 03 23:15:25 2015 Return-path: Envelope-to: ged-emacs-devel@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 1ZXbqr-0005Q9-Iz for ged-emacs-devel@m.gmane.org; Thu, 03 Sep 2015 23:15:21 +0200 Original-Received: from localhost ([::1]:51944 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXbqs-0001jE-2H for ged-emacs-devel@m.gmane.org; Thu, 03 Sep 2015 17:15:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53850) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXbqb-0001bs-Qf for emacs-devel@gnu.org; Thu, 03 Sep 2015 17:15:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXbqY-0001O9-Le for emacs-devel@gnu.org; Thu, 03 Sep 2015 17:15:05 -0400 Original-Received: from limerock04.mail.cornell.edu ([128.84.13.244]:41877) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXbqY-0001HT-ID for emacs-devel@gnu.org; Thu, 03 Sep 2015 17:15:02 -0400 X-CornellRouted: This message has been Routed already. Original-Received: from authusersmtp.mail.cornell.edu (granite4.serverfarm.cornell.edu [10.16.197.9]) by limerock04.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id t83LEuRd007090; Thu, 3 Sep 2015 17:14:57 -0400 Original-Received: from [10.128.129.163] (dhcp-gs-419.eduroam.cornell.edu [10.128.129.163]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id t83LErAS004582 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 3 Sep 2015 17:14:56 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 In-Reply-To: <1668732705.1162011.1441310007202.JavaMail.yahoo@mail.yahoo.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 128.84.13.244 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:189558 Archived-At: On 9/3/2015 3:53 PM, Michael Mauger wrote: > Please correct me if I am not right here, but it appears that in byte-compiled files (don't always?) expand #$ to the current elisp file name. > > I wrote a module containing the following code: > > (message "x: %S" #$) > > When I load this module using load-file of the .el file adds a line to the *Message* buffer > > Loading /user/michael/x.el (source)... > > x: "/user/michael/x.el" > Loading /user/michael/x.el (source)...done > > > I then byte-compile the module, use load-file on the .elc file, and now I get > > > Loading /user/michael/x.elc... > x: nil > Loading /user/michael/x.elc...done > > > This causes all loading ELPA/MELPA packages to generate the following error during initialization: > > (wrong-type-argument stringp nil) > > because of the following generated line in the package autoloads script: > > (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) > > and then the autoloads file gets byte-compile'd when installed. Why does the autoloads file get byte-compiled? All the package autoloads files on my system have the following in the "Local Variables" section: ;; no-byte-compile: t Ken