From 8e4b5d3f3b82980ab9a08717d2441aa69f7591bd Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Wed, 1 Feb 2006 16:18:45 +0000 Subject: [PATCH] changed drscheme-language-readers to allow relative path specs and fixed a bug svn: r2070 --- .../drscheme/private/language-configuration.ss | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/collects/drscheme/private/language-configuration.ss b/collects/drscheme/private/language-configuration.ss index 90a4d4e66d..ab502f6d7e 100644 --- a/collects/drscheme/private/language-configuration.ss +++ b/collects/drscheme/private/language-configuration.ss @@ -1148,7 +1148,6 @@ (λ () (map (λ (lang-position) #f) lang-positions)))]) - (printf "dir ~s lang-positions ~s\n" directory lang-positions) (cond [(and (list? lang-positions) (andmap (λ (lang-position numbers) @@ -1178,7 +1177,7 @@ ;; approximation (no good test, really) ;; since it depends on the value of a mz ;; parameter to interpret the module spec - (or (eq? x #f) (symbol? x) (pair? x))) + (or (string? x) (eq? x #f) (symbol? x) (pair? x))) reader-specs) (= (length lang-positions) @@ -1203,12 +1202,17 @@ (format "uncaught exception: ~s" x))) read-syntax/namespace-introduce)]) (contract - (opt-> (any/c) - (port? (list/c (and/c number? integer? exact? (>=/c 0)) - (and/c number? integer? exact? (>=/c 0)) - (and/c number? integer? exact? (>=/c 0)))) + (opt-> () + (any/c port?) (or/c syntax? eof-object?)) - (dynamic-require reader-spec 'read-syntax) + (dynamic-require + (cond + [(string? reader-spec) + (build-path + directory + (platform-independent-string->path reader-spec))] + [else reader-spec]) + 'read-syntax) (string->symbol (format "~s" lang-position)) 'drscheme)) read-syntax/namespace-introduce)])