Eliminate *working-directory-pathname*.
authorChris Hanson <org/chris-hanson/cph>
Sat, 27 Feb 2016 21:32:17 +0000 (13:32 -0800)
committerChris Hanson <org/chris-hanson/cph>
Sat, 27 Feb 2016 21:32:17 +0000 (13:32 -0800)
src/runtime/rep.scm
src/runtime/runtime.pkg
src/runtime/wrkdir.scm

index a7eebe3011cbac347375ab2a36f513b812463a25..fc9a2a5ec7ba2954adce60dc4f06f4b8825910f3 100644 (file)
@@ -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)
index 431bf35399073a8e85f916d944e1852a5ba6a2c7..2a6de979e9f11612b825c2bfbf5d2746c66c07c8 100644 (file)
@@ -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)
index 1871d2acfaff164395a978a3b0904c0035d3c324..ba5dae21b68eb79b19872b0fee856c1ab272e47d 100644 (file)
@@ -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