(declare (usual-integrations))
\f
(define directory-read/adjust-patterns? true)
-(define *expand-directory-prefixes?* true)
+(define *expand-directory-prefixes?*)
+
+(define (initialize-package!)
+ (set! *expand-directory-prefixes?* (make-fluid true)))
(define (directory-read pattern #!optional sort?)
(if (if (default-object? sort?) true sort?)
(merge-pathnames pathname directory-path))
(let ((pathnames
(let ((fnames (generate-directory-pathnames directory-path)))
- (fluid-let ((*expand-directory-prefixes?* false))
- (map ->pathname fnames)))))
+ (let-fluid *expand-directory-prefixes?* false
+ (lambda ()
+ (map ->pathname fnames))))))
(if (and (eq? (pathname-name pattern) 'WILD)
(eq? (pathname-type pattern) 'WILD))
pathnames
(cdr components))))))
(let ((end (string-length string)))
(if (or (= 0 end)
- (not *expand-directory-prefixes?*))
+ (not (fluid *expand-directory-prefixes?*)))
components
(case (string-ref string 0)
((#\$)
(RUNTIME PATHNAME UNIX)
(RUNTIME PATHNAME DOS)
(RUNTIME PATHNAME)
+ (RUNTIME DIRECTORY)
(RUNTIME WORKING-DIRECTORY)
(RUNTIME LOAD)
(RUNTIME SIMPLE-FILE-OPS)
(declare (usual-integrations))
\f
-(define *expand-directory-prefixes?* #t)
+(define *expand-directory-prefixes?*)
+
+(define (initialize-package!)
+ (set! *expand-directory-prefixes?* (make-fluid #t)))
(define (directory-read pattern #!optional sort? full?)
(let ((sort? (if (default-object? sort?) #t sort?))
(lambda (pathname)
(merge-pathnames pathname directory-path)))
(let ((fnames (generate-directory-pathnames pattern)))
- (fluid-let ((*expand-directory-prefixes?* #f))
- (map ->pathname fnames))))))
+ (let-fluid *expand-directory-prefixes?* #f
+ (lambda ()
+ (map ->pathname fnames)))))))
(define (generate-directory-pathnames pathname)
(let ((channel (directory-channel-open (->namestring pathname))))
(cons (merge-pathnames (car entry) directory-path)
(cdr entry))))
(let ((entries (generate-directory-entries pattern)))
- (fluid-let ((*expand-directory-prefixes?* #f))
- (map (lambda (entry) (cons (->pathname (car entry)) (cdr entry)))
- entries))))))
+ (let-fluid *expand-directory-prefixes?* #f
+ (lambda ()
+ (map (lambda (entry) (cons (->pathname (car entry)) (cdr entry)))
+ entries)))))))
(define (generate-directory-entries pathname)
(let ((channel (directory-channel-open (->namestring pathname))))
(declare (usual-integrations))
\f
-(define *expand-directory-prefixes?* #t)
+(define *expand-directory-prefixes?*)
+
+(define (initialize-package!)
+ (set! *expand-directory-prefixes?* (make-fluid #t)))
(define (directory-read pattern #!optional sort?)
(if (if (default-object? sort?) #t sort?)
(lambda (pathname)
(merge-pathnames pathname directory-path)))
(let ((fnames (generate-directory-pathnames pattern)))
- (fluid-let ((*expand-directory-prefixes?* #f))
- (map ->pathname fnames))))))
+ (let-fluid *expand-directory-prefixes?* #f
+ (lambda ()
+ (map ->pathname fnames)))))))
(define (generate-directory-pathnames pathname)
(let ((channel (directory-channel-open (->namestring pathname))))
(export (runtime pathname)
*expand-directory-prefixes?*)
(export ()
- directory-read))
+ directory-read)
+ (initialization (initialize-package!)))
(os-type-case
((unix)
stack-sampler:debug-internal-errors?
stack-sampler:show-expressions?
with-stack-sampling)
- (initialization (initialize-package!)))
\ No newline at end of file
+ (initialization (initialize-package!)))
(declare (usual-integrations))
\f
-(define *expand-directory-prefixes?* true)
+(define *expand-directory-prefixes?*)
+
+(define (initialize-package!)
+ (set! *expand-directory-prefixes?* (make-fluid true)))
(define (directory-read pattern #!optional sort?)
(if (if (default-object? sort?) true sort?)
(merge-pathnames pathname directory-path))
(let ((pathnames
(let ((fnames (generate-directory-pathnames directory-path)))
- (fluid-let ((*expand-directory-prefixes?* false))
- (map ->pathname fnames)))))
+ (let-fluid *expand-directory-prefixes?* false
+ (lambda ()
+ (map ->pathname fnames))))))
(if (and (eq? (pathname-name pattern) 'WILD)
(eq? (pathname-type pattern) 'WILD))
pathnames
(cdr components)))))
(let ((end (string-length string)))
(if (or (= 0 end)
- (not *expand-directory-prefixes?*))
+ (not (fluid *expand-directory-prefixes?*)))
components
(case (string-ref string 0)
((#\$)