From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludovic.courtes@laas.fr (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: [PATCH] `try-module-autoload' and `current-reader' Date: Thu, 12 Jan 2006 10:06:48 +0100 Organization: LAAS-CNRS Message-ID: <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 1137070597 13311 80.91.229.2 (12 Jan 2006 12:56:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 12 Jan 2006 12:56:37 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Jan 12 13:56:30 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 1Ex1zv-0004ZD-8Q for guile-devel@m.gmane.org; Thu, 12 Jan 2006 13:56:13 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ex1im-00047P-Sc for guile-devel@m.gmane.org; Thu, 12 Jan 2006 07:38:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EwyU7-0008SK-2H for guile-devel@gnu.org; Thu, 12 Jan 2006 04:11:07 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EwyTH-0007wo-7G for guile-devel@gnu.org; Thu, 12 Jan 2006 04:10:27 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EwySa-0007fH-Rc for guile-devel@gnu.org; Thu, 12 Jan 2006 04:09:33 -0500 Original-Received: from [140.93.0.15] (helo=laas.laas.fr) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EwyVM-000655-Q7 for guile-devel@gnu.org; Thu, 12 Jan 2006 04:12:25 -0500 Original-Received: by laas.laas.fr (8.13.1/8.13.4) with SMTP id k0C97HOv002914; Thu, 12 Jan 2006 10:07:18 +0100 (CET) Original-To: guile-devel@gnu.org X-URL: http://www.laas.fr/~lcourtes/ X-Revolutionary-Date: 23 =?iso-8859-1?Q?Niv=F4se?= an 214 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEB1F5364 X-PGP-Key: http://www.laas.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: powerpc-unknown-linux-gnu Mail-Followup-To: guile-devel@gnu.org User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) X-Spam-Score: 0 () X-Scanned-By: MIMEDefang at CNRS-LAAS X-MIME-Autoconverted: from 8bit to quoted-printable by laas.laas.fr id k0C97HOv002914 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:5587 Archived-At: 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. Thanks, Ludovic. 2006-01-12 Ludovic Court=E8s * boot-9.scm (try-module-autoload): When loading a non-compiled file, use `load-module' instead of `primitive-load'. Doing so will result in the use of the build-in reader when loading the module, no matter what the current value of `current-reader' is. --- orig/ice-9/boot-9.scm +++ mod/ice-9/boot-9.scm @@ -2180,7 +2180,7 @@ (load-file load-compiled full))) ((%search-load-path file) =3D> (lambda (full) - (load-file primitive-load full)))))) + (load-file load-module full)))))) (lambda () (set-autoloaded! dir-hint name didit))) didit)))) =20 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel