From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nikolaj Schumacher Newsgroups: gmane.emacs.help Subject: Re: Intercepting require statements Date: Wed, 18 Mar 2009 14:25:32 +0100 Message-ID: References: <8349be33-bbb3-4158-9644-599b117c92ac@c36g2000yqn.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1237382792 5360 80.91.229.12 (18 Mar 2009 13:26:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Mar 2009 13:26:32 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: =?utf-8?Q?Nordl=C3=B6w?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 18 14:27:49 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ljvnr-0000bm-2P for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Mar 2009 14:27:27 +0100 Original-Received: from localhost ([127.0.0.1]:35200 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LjvmU-0004xq-MI for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Mar 2009 09:26:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ljvm9-0004xl-46 for help-gnu-emacs@gnu.org; Wed, 18 Mar 2009 09:25:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ljvm7-0004xY-4Q for help-gnu-emacs@gnu.org; Wed, 18 Mar 2009 09:25:39 -0400 Original-Received: from [199.232.76.173] (port=36496 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ljvm7-0004xV-0w for help-gnu-emacs@gnu.org; Wed, 18 Mar 2009 09:25:39 -0400 Original-Received: from dd18200.kasserver.com ([85.13.138.168]:58187) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ljvm4-0003E5-HG for help-gnu-emacs@gnu.org; Wed, 18 Mar 2009 09:25:38 -0400 Original-Received: from thursday (f051002216.adsl.alicedsl.de [78.51.2.216]) by dd18200.kasserver.com (Postfix) with ESMTP id 6A6C61807941F; Wed, 18 Mar 2009 14:25:36 +0100 (CET) In-Reply-To: <8349be33-bbb3-4158-9644-599b117c92ac@c36g2000yqn.googlegroups.com> (=?utf-8?Q?=22Nordl=C3=B6w=22's?= message of "Wed, 18 Mar 2009 05:12:20 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (darwin) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:63045 Archived-At: Nordl=C3=B6w wrote: > Is there a way to somehow intercept require statements like is done in > byte-code-cache.el in the following way: > > (setq load-source-file-function #'bcc-load-source-file) Doesn't require use `load' internally? (setq load-source-file-function 'ignore) (require 'something-not-yet-compiled) is enough to prevent loading. I think the problem is that `load' doesn't look at `load-source-file-function' if it finds a byte-compiled file. So there's no chance to automatically re-compile an outdated file. I don't think there's a way around that. see also: http://lists.gnu.org/archive/html/bug-gnu-emacs/2009-01/msg00907.html regards, Nikolaj Schumacher