From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] `try-module-autoload' and `current-reader' Date: Thu, 19 Jan 2006 00:13:54 +0000 Message-ID: <87irshhy65.fsf@ossau.uklinux.net> References: <874q49yfvb.fsf@laas.fr> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1137634669 26280 80.91.229.2 (19 Jan 2006 01:37:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 19 Jan 2006 01:37:49 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Jan 19 02:37:46 2006 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EzOkB-0000w1-7E for guile-devel@m.gmane.org; Thu, 19 Jan 2006 02:37:44 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EzOiV-0002fS-VO for guile-devel@m.gmane.org; Wed, 18 Jan 2006 20:36:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EzNZ2-00005P-0n for guile-devel@gnu.org; Wed, 18 Jan 2006 19:22:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EzNXs-0007ix-RB for guile-devel@gnu.org; Wed, 18 Jan 2006 19:21:00 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EzNVq-0006bF-9m for guile-devel@gnu.org; Wed, 18 Jan 2006 19:18:50 -0500 Original-Received: from [80.84.72.33] (helo=mail3.uklinux.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EzNZm-0000r8-MX for guile-devel@gnu.org; Wed, 18 Jan 2006 19:22:54 -0500 Original-Received: from laruns (host86-129-132-201.range86-129.btcentralplus.com [86.129.132.201]) by mail3.uklinux.net (Postfix) with ESMTP id 8F2FB409FB0 for ; Thu, 19 Jan 2006 00:16:19 +0000 (UTC) Original-Received: from laruns (laruns [127.0.0.1]) by laruns (Postfix) with ESMTP id F05FE9F929 for ; Thu, 19 Jan 2006 00:13:54 +0000 (GMT) Original-To: guile-devel@gnu.org In-Reply-To: <874q49yfvb.fsf@laas.fr> ( =?iso-8859-1?q?Ludovic_Court=E8s's_message_of?= "Thu, 12 Jan 2006 10:06:48 +0100") User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:5596 Archived-At: ludovic.courtes@laas.fr (Ludovic Court=E8s) writes: > Hi, > > In `boot-9.scm', `try-module-autoload' should be using `load-module', > and not `primitive-load', when loading a non-compiled module. The > reasons are (i) non-autoloaded modules are loaded using `load-module' > and (ii) `load-module' and `primitive-load' interact differently with > the `current-reader' fluid. > > `load-module' uses R4RS `load' which does some framing on the value of > `current-reader', setting it to `#f' (meaning: use the built-in `read') > if no optional reader argument was provided. OTOH, `primitive-load' > doesn't change the value of `current-reader', thus resulting in a > different behavior. Hmm; I think just adding (with-fluids ((current-reader #f)) ...) around the (load-file ...) call would be better. Otherwise we would be introducing two extra changes: 1. Starting a new stack (the start-stack form in R4RS's load). This affects backtraces, and it is occasionally useful for a backtrace to show that module X is being loaded because of code from module Y. 2. Interpreting a file path beginning with "." as relative to the current module's load filename. What do you think? Neil _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel