summaryrefslogtreecommitdiff
path: root/scheme
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-03-27 15:45:14 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-03-27 15:45:14 +0100
commit9a6f0303a54aa3c687e63f03e83cae63d4c8e5ce (patch)
treefa8e5718b94d763f1df83b3a91ab86c2fdcfd9c9 /scheme
parent1e39c1ab55a86b66a58323bb9ea16de59f1c3e61 (diff)
downloadgeiser-guile-9a6f0303a54aa3c687e63f03e83cae63d4c8e5ce.tar.gz
geiser-guile-9a6f0303a54aa3c687e63f03e83cae63d4c8e5ce.tar.bz2
PLT: some simplifications.
Diffstat (limited to 'scheme')
-rw-r--r--scheme/plt/geiser/modules.ss19
1 files changed, 7 insertions, 12 deletions
diff --git a/scheme/plt/geiser/modules.ss b/scheme/plt/geiser/modules.ss
index 9bdede1..ef6530a 100644
--- a/scheme/plt/geiser/modules.ss
+++ b/scheme/plt/geiser/modules.ss
@@ -28,19 +28,14 @@
(else `(file ,spec))))
(define (module-spec->namespace spec (lang #f))
- (let* ((spec (ensure-module-spec spec))
- (try-lang (lambda (e)
- (if (symbol? lang)
- (begin
- (load-module lang #f (current-namespace))
- (module->namespace lang))
- (current-namespace))))
- (filesystem-handler (lambda (e)
- (with-handlers ((exn? try-lang))
- (module->namespace `',spec)))))
+ (let ((spec (ensure-module-spec spec)))
(if spec
- (with-handlers ((exn:fail:filesystem? filesystem-handler)
- (exn? try-lang))
+ (with-handlers ((exn?
+ (lambda (_)
+ (with-handlers
+ ((exn? (const (current-namespace))))
+ (load-module lang #f (current-namespace))
+ (module->namespace lang)))))
(module->namespace spec))
(current-namespace))))