From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#11847: 24.1.50; Error: Don't know how to compile #[nil "..."] Date: Mon, 16 Jul 2012 22:50:16 -0700 Message-ID: <01718D4EC241409DB101092AB41EAFA9@us.oracle.com> References: <6CFCB42782714EAEA0283E766D05BE7F@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1342504272 13091 80.91.229.3 (17 Jul 2012 05:51:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 17 Jul 2012 05:51:12 +0000 (UTC) Cc: 11847@debbugs.gnu.org To: "'Stefan Monnier'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 17 07:51:11 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 1Sr0gf-0003RT-05 for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Jul 2012 07:51:09 +0200 Original-Received: from localhost ([::1]:60741 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sr0ge-0006mh-Bk for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Jul 2012 01:51:08 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48055) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sr0gb-0006mc-J7 for bug-gnu-emacs@gnu.org; Tue, 17 Jul 2012 01:51:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sr0ga-00077h-6N for bug-gnu-emacs@gnu.org; Tue, 17 Jul 2012 01:51:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35532) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sr0ga-00077d-2x for bug-gnu-emacs@gnu.org; Tue, 17 Jul 2012 01:51:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Sr0mM-0001pS-4e for bug-gnu-emacs@gnu.org; Tue, 17 Jul 2012 01:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Jul 2012 05:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11847-submit@debbugs.gnu.org id=B11847.13425045966996 (code B ref 11847); Tue, 17 Jul 2012 05:57:02 +0000 Original-Received: (at 11847) by debbugs.gnu.org; 17 Jul 2012 05:56:36 +0000 Original-Received: from localhost ([127.0.0.1]:45078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sr0lw-0001om-Cx for submit@debbugs.gnu.org; Tue, 17 Jul 2012 01:56:36 -0400 Original-Received: from acsinet15.oracle.com ([141.146.126.227]:42207) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sr0lu-0001of-8b for 11847@debbugs.gnu.org; Tue, 17 Jul 2012 01:56:35 -0400 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q6H5oXUn004656 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 17 Jul 2012 05:50:34 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q6H5oW9u016380 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 17 Jul 2012 05:50:33 GMT Original-Received: from abhmt110.oracle.com (abhmt110.oracle.com [141.146.116.62]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q6H5oWOE023832; Tue, 17 Jul 2012 00:50:32 -0500 Original-Received: from dradamslap1 (/71.202.147.44) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 16 Jul 2012 22:50:32 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Thread-Index: Ac1ZQPeTjZwMk9PsT6mvFCO748O8PgAAGBawAqSj6yA= X-Source-IP: ucsinet21.oracle.com [156.151.31.93] 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:62021 Archived-At: > > Byte-compilation is not done within quoted forms (i.e. forms > > that start with '), so byte-compilation normally is not done > > on the code passed to eval-after-load since that code is > > usually quoted. > > That's what I thought. Which means that I still need that > code to let Icicles users optionally byte-compile the defuns > in the `eval-after-load' contexts. Or maybe not? In the latest Windows build, from today (7/16), I'm seeing these (new) messages during loading: Function icicle-bookmark-a-file is already compiled Function icicle-tag-a-file is already compiled Function icicle-untag-a-file is already compiled Function icicle-find-file-tagged is already compiled etc. Those are the functions that I was worried would not be compiled and so called explicitly for their compilation. Now I wonder. So I guess I'm still not understanding. I byte-compile the source file, which has this kind of thing: (defun icicle-cmd2-after-load-bookmark+ () (icicle-define-file-command icicle-bookmark-a-file ...) (icicle-maybe-byte-compile-after-load icicle-bookmark-a-file) ... ; more of the same: function defs followed by calls to compile ) (eval-after-load "bookmark+" '(icicle-cmd2-after-load-bookmark+)) `icicle-define-file-command' is a macro defined in a file available at compile time. It expands to a defun (e.g. that defines function `icicle-bookmark-a-file' here). `icicle-maybe-byte-compile-after-load' is this simple macro: (defmacro icicle-maybe-byte-compile-after-load (function) `(when (and icicle-byte-compile-eval-after-load-flag (fboundp ',function)) (require 'bytecomp) (let ((byte-compile-warnings ()) (byte-compile-verbose nil)) (byte-compile ',function)))) (Now that I look at that again I notice that that macro could/should just be a function. Dunno why I made it a macro.) Do those messages indicate that the functions in question were already compiled in the .elc where they are defined inside `icicle-cmd2-after-load-bookmark+'? Looking at your previous response, it seems to suggest only that the _call_ to `icicle-cmd2-after-load-bookmark+' would not be byte-compiled, because it is quoted. But the defuns (via the macro) that are in the body of `icicle-cmd2-after-load-bookmark+': are they byte-compiled in the .elc where `icicle-cmd2-after-load-bookmark+' is defined? I was afraid they would not be, but the messages seem to indicate that they are. IOW, given those messages, I'm wondering again whether I really need the (user-optional) calls to `icicle-maybe-byte-compile-after-load'. I was supposing that I needed them because the definitions are inside an `eval-after-load' (with a quoted sexp, as you mentioned). > > > (and if so whether that is true in older Emacs versions also) > > > > Yes, there has not been any change in this regard. What has > > changed is that byte-compile now complains when it can't do > > its job, whereas it used to silently just return nil without > > doing anything. > > I guess the bug has to do with why it thinks it cannot do its > job here. Unless there is some bug in my code that makes compilation > impossible where it should otherwise be possible. Can you tell by > looking at the code I sent? Or do you think there is a byte-compiler > bug here? Since the bug is no longer manifested, now I'm guessing that it was previously complaining that it could not compile only because the target was already compiled. Is that the case? I'd be glad to get rid of the micmac of using `icicle-maybe-byte-compile-after-load', if I understood that it did not actually do anything worthwhile. Looking for some understanding of this. Thx.