From 43a77c0f14cca9c32df9792e0cb272d9885dd078 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sat, 27 Feb 2016 19:23:04 -0800 Subject: [PATCH] Use parameter setter on working-directory-pathname. --- src/runtime/wrkdir.scm | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/runtime/wrkdir.scm b/src/runtime/wrkdir.scm index 383ef6084..04151efe7 100644 --- a/src/runtime/wrkdir.scm +++ b/src/runtime/wrkdir.scm @@ -28,9 +28,13 @@ USA. ;;; package: (runtime working-directory) (declare (usual-integrations)) - + (define (initialize-package!) - (set! working-directory-pathname (make-parameter #f)) + (set! working-directory-pathname + (make-general-parameter #f + identity-procedure + identity-procedure + wd-setter)) (reset!) (add-event-receiver! event:after-restore reset!)) @@ -45,6 +49,11 @@ USA. (define working-directory-pathname) +(define (wd-setter set-param pathname) + (set-param pathname) + (param:default-pathname-defaults pathname) + pathname) + (define (set-working-directory-pathname! name) (let ((pathname (new-pathname name))) ;; XXX Checking FILE-DIRECTORY? is a stop-gap kludge until we fix @@ -62,7 +71,6 @@ USA. 'SET-WORKING-DIRECTORY-PATHNAME! (list name))) (working-directory-pathname pathname) - (param:default-pathname-defaults pathname) (cmdl/set-default-directory (nearest-cmdl) pathname) pathname)) -- 2.25.1