From: ludovic.courtes@laas.fr (Ludovic Courtès)
Subject: [PATCH] `try-module-autoload' and `current-reader'
Date: Thu, 12 Jan 2006 10:06:48 +0100 [thread overview]
Message-ID: <874q49yfvb.fsf@laas.fr> (raw)
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 <ludovic.courtes@laas.fr>
* 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))))
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
next reply other threads:[~2006-01-12 9:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-12 9:06 Ludovic Courtès [this message]
2006-01-19 0:13 ` [PATCH] `try-module-autoload' and `current-reader' Neil Jerram
2006-01-19 8:42 ` Ludovic Courtès
2006-01-21 8:46 ` Neil Jerram
2006-01-23 8:22 ` Ludovic Courtès
2006-01-26 19:25 ` Neil Jerram
2006-01-27 8:41 ` Ludovic Courtès
2006-02-04 15:54 ` Neil Jerram
2006-01-19 21:54 ` Kevin Ryde
2006-01-20 8:31 ` Ludovic Courtès
2006-01-20 20:47 ` Kevin Ryde
2006-01-21 8:29 ` Neil Jerram
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874q49yfvb.fsf@laas.fr \
--to=ludovic.courtes@laas.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).