Mercurial > hg > jslab
view src/scheme/props.scm @ 1:5df24c91468d
Oh my what a mess.
author | samer |
---|---|
date | Fri, 05 Apr 2019 16:26:00 +0100 |
parents | bf79fb79ee13 |
children |
line wrap: on
line source
; __________________________________________ ; open local args file and push on to environment stack ; this will now accept all stored data. also adds agent to ; save on exit. (define local-props null) (define local-file null) (define (push-properties file) (set! local-props (samer.core.util.Properties. (Shell.env))) (set! local-file file) (tryCatch (.load local-props (java.io.FileInputStream. file)) (lambda (e) (Shell.trace (string-append "failed to load")))) (Shell.push local-props) ;;; this changes to global exit procedure to save the local ;;; properties as well as the regular properties (set! exit (lambda () (display (string-append "saving local properites to " local-file)) (.save local-props (java.io.FileOutputStream. local-file)) (Shell.interpret "exit") (System.exit 0) )) )