unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* [PATCH] `try-module-autoload' and `current-reader'
@ 2006-01-12  9:06 Ludovic Courtès
  2006-01-19  0:13 ` Neil Jerram
  0 siblings, 1 reply; 12+ messages in thread
From: Ludovic Courtès @ 2006-01-12  9:06 UTC (permalink / 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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2006-02-04 15:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-12  9:06 [PATCH] `try-module-autoload' and `current-reader' Ludovic Courtès
2006-01-19  0:13 ` 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

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).