From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Keeping run-time code from running at compile-time Date: Mon, 10 Oct 2005 23:48:07 -0400 Organization: Bell Sympatico Message-ID: <87wtkklnsh.fsf-monnier+gnu.emacs.help@gnu.org> References: <4951.1128644991@olgas.newt.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1129002758 16467 80.91.229.2 (11 Oct 2005 03:52:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 11 Oct 2005 03:52:38 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 11 05:52:36 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EPBAb-0002Kw-AI for geh-help-gnu-emacs@m.gmane.org; Tue, 11 Oct 2005 05:51:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EPBAa-0004k4-Bc for geh-help-gnu-emacs@m.gmane.org; Mon, 10 Oct 2005 23:51:16 -0400 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:5B6n8L5yhFg8oXTTZ1T0qM9ymac= Original-Lines: 14 Original-NNTP-Posting-Host: 70.48.81.29 Original-X-Complaints-To: abuse@sympatico.ca Original-X-Trace: news20.bellglobal.com 1129002490 70.48.81.29 (Mon, 10 Oct 2005 23:48:10 EDT) Original-NNTP-Posting-Date: Mon, 10 Oct 2005 23:48:10 EDT Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!cyclone.bc.net!news.ca.mci.com!news.uunet.ca!tor-nx1!webster!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Original-Xref: shelby.stanford.edu gnu.emacs.help:134547 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:30127 Archived-At: > I'm having some compiling trouble. File B which requires file A fails to > compile because file A contains code that should not be run at > compile-time, just run-time. Basically you're saying that the compiler should either not load file A when compiling file B, or load it be "weakly". Such issues is one of the reasons why toplevel expressions in .el files should do as little as possible. So most likely the problem is that your toplevel expressions in file A should be moved to a function that is called explicitly from elsewhere (e.g. from a major mode function). Stefan