Mercurial > hg > jslab
view src/scheme/props.scm @ 0:bf79fb79ee13
Initial Mercurial check in.
author | samer |
---|---|
date | Tue, 17 Jan 2012 17:50:20 +0000 |
parents | |
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) )) )