#| -*-Scheme-*-
-$Id: load.scm,v 14.100 2007/10/12 02:12:11 cph Exp $
+$Id: load.scm,v 14.101 2007/11/26 05:15:32 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
(thunk)))
\f
(define (with-eval-unit uri thunk)
- (let ((uri (->absolute-uri uri 'WITH-EVAL-UNIT)))
- (fluid-let ((*eval-unit* uri))
- (let ((pathname (uri->pathname uri #f)))
- (if pathname
- (with-working-directory-pathname (directory-pathname pathname)
- thunk)
- (thunk))))))
+ (fluid-let ((*eval-unit* (->absolute-uri uri 'WITH-EVAL-UNIT)))
+ (thunk)))
(define (current-eval-unit #!optional error?)
(let ((unit *eval-unit*))
#| -*-Scheme-*-
-$Id: xhtml-expander.scm,v 1.14 2007/10/12 02:13:17 cph Exp $
+$Id: xhtml-expander.scm,v 1.15 2007/11/26 05:15:33 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
(let ((pathname (merge-pathnames pathname)))
(with-eval-unit (pathname->uri pathname)
(lambda ()
- (with-load-environment environment
+ (with-working-directory-pathname (directory-pathname pathname)
(lambda ()
- (fluid-let ((*sabbr-table* (make-eq-hash-table)))
- (read-xml-file pathname
- `((scheme ,(pi-expander environment))
- (svar ,svar-expander)
- (sabbr ,sabbr-expander))))))))))
+ (with-load-environment environment
+ (lambda ()
+ (fluid-let ((*sabbr-table* (make-eq-hash-table)))
+ (read-xml-file pathname
+ `((scheme ,(pi-expander environment))
+ (svar ,svar-expander)
+ (sabbr ,sabbr-expander))))))))))))
\f
(define (make-expansion-environment pathname)
(let ((environment (extend-top-level-environment expander-environment)))