fix guide's use of current-directory at compile time

This commit is contained in:
Matthew Flatt 2010-06-30 10:11:04 -06:00
parent 47eb8ea815
commit cd95e082d7

View File

@ -11,7 +11,9 @@
(define-syntax (racketmodfile stx)
(syntax-case stx ()
[(_ file)
(let ([f (path->complete-path (syntax-e #'file))])
(let ([f (path->complete-path (syntax-e #'file)
(or (current-load-relative-directory)
(current-directory)))])
(register-external-file f)
(with-syntax ([(content ...)
(call-with-input-file*