[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] `try-module-autoload' and `current-reader'
From: |
Ludovic Courtès |
Subject: |
[PATCH] `try-module-autoload' and `current-reader' |
Date: |
Thu, 12 Jan 2006 10:06:48 +0100 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) |
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ès <address@hidden>
* 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)
=> (lambda (full)
- (load-file primitive-load full))))))
+ (load-file load-module full))))))
(lambda () (set-autoloaded! dir-hint name didit)))
didit))))
- [PATCH] `try-module-autoload' and `current-reader',
Ludovic Courtès <=
Re: [PATCH] `try-module-autoload' and `current-reader', Kevin Ryde, 2006/01/19