fix HtDP executables (PR 9158)

svn: r10037
This commit is contained in:
Matthew Flatt 2008-05-30 14:21:22 +00:00
parent a78bf662b2
commit c8cbc555e5
2 changed files with 5 additions and 4 deletions

View File

@ -30,7 +30,9 @@
(let* ([table (read port)]
[path (object-name port)]
[modname
(if path
(if (or (path? path)
(and (string? path)
(path-string? path)))
(let-values ([(base name dir) (split-path path)])
(string->symbol (path->string (path-replace-suffix name #""))))
(lookup 'modname table))])

View File

@ -6,6 +6,7 @@
mzlib/class
mzlib/contract
mzlib/list
scheme/gui/dynamic
"image.ss"
"editor.ss"
"private/compat.ss")
@ -662,9 +663,7 @@
(wxme-convert-port port close? #f))
(define (do-read port who read)
(let ([port (if (with-handlers ([exn:fail? (lambda (x) #f)])
(dynamic-require '#%mred-kernel #f)
#t)
(let ([port (if (gui-available?)
;; GUI mode, since MrEd is available:
(let ([text% (dynamic-require 'mred 'text%)]
[open-input-text-editor (dynamic-require 'mred 'open-input-text-editor)])