From: Chris Hanson Date: Sat, 27 Feb 2016 21:32:17 +0000 (-0800) Subject: Eliminate *working-directory-pathname*. X-Git-Tag: mit-scheme-pucked-9.2.12~261^2~122 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=89e3780e53992b416998d54522bed51ae8bd2ff2;p=mit-scheme.git Eliminate *working-directory-pathname*. --- diff --git a/src/runtime/rep.scm b/src/runtime/rep.scm index a7eebe301..fc9a2a5ec 100644 --- a/src/runtime/rep.scm +++ b/src/runtime/rep.scm @@ -122,8 +122,8 @@ USA. (cons *notification-output-port* #f) (cons *trace-output-port* #f) (cons *interaction-i/o-port* #f) - (cons *working-directory-pathname* - (*working-directory-pathname*)) + (cons working-directory-pathname + (working-directory-pathname)) (cons *nearest-cmdl* cmdl) (cons standard-error-hook #f) (cons standard-warning-hook #f) diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index 431bf3539..2a6de979e 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -5025,8 +5025,6 @@ USA. set-working-directory-pathname! with-working-directory-pathname working-directory-pathname) - (export (runtime rep) - *working-directory-pathname*) (initialization (initialize-package!))) (define-package (runtime user-interface) diff --git a/src/runtime/wrkdir.scm b/src/runtime/wrkdir.scm index 1871d2acf..ba5dae21b 100644 --- a/src/runtime/wrkdir.scm +++ b/src/runtime/wrkdir.scm @@ -30,6 +30,7 @@ USA. (declare (usual-integrations)) (define (initialize-package!) + (set! working-directory-pathname (make-parameter #f)) (reset!) (add-event-receiver! event:after-restore reset!)) @@ -38,14 +39,11 @@ USA. (pathname-simplify (pathname-as-directory ((ucode-primitive working-directory-pathname)))))) - (*working-directory-pathname* pathname) + (working-directory-pathname pathname) (default-pathname-defaults pathname)) unspecific) -(define *working-directory-pathname* (make-parameter #f)) - -(define (working-directory-pathname) - (*working-directory-pathname*)) +(define working-directory-pathname) (define (set-working-directory-pathname! name) (let ((pathname (new-pathname name))) @@ -63,7 +61,7 @@ USA. "no such directory") 'SET-WORKING-DIRECTORY-PATHNAME! (list name))) - (*working-directory-pathname* pathname) + (working-directory-pathname pathname) (default-pathname-defaults pathname) (cmdl/set-default-directory (nearest-cmdl) pathname) pathname)) @@ -71,10 +69,10 @@ USA. (define (with-working-directory-pathname name thunk) (let ((pathname (new-pathname name))) (parameterize* (list (cons default-pathname-defaults pathname) - (cons *working-directory-pathname* pathname)) + (cons working-directory-pathname pathname)) thunk))) (define (new-pathname name) (pathname-simplify (pathname-as-directory - (merge-pathnames name (*working-directory-pathname*))))) \ No newline at end of file + (merge-pathnames name (working-directory-pathname))))) \ No newline at end of file