summaryrefslogtreecommitdiffstats
path: root/jscheme.init
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:40 -0800
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:40 -0800
commit4684239efa63dc1b2c1cbe37ef7d3062029f5532 (patch)
tree606a687e9279e9bf6048925878968df9875a4973 /jscheme.init
parent64f037d91e0c9296dcaef9a0ff3eb33b19a2ed34 (diff)
downloadslib-187d39f09ca275e1869687576ece440afd9d5b51.tar.gz
slib-187d39f09ca275e1869687576ece440afd9d5b51.zip
Import Upstream version 3b1upstream/3b1
Diffstat (limited to 'jscheme.init')
-rw-r--r--jscheme.init34
1 files changed, 19 insertions, 15 deletions
diff --git a/jscheme.init b/jscheme.init
index 9e568b7..9a0f0e6 100644
--- a/jscheme.init
+++ b/jscheme.init
@@ -39,19 +39,20 @@
;;; the version the scheme implementation loading this file.
(define (scheme-implementation-version) "7.2")
+(define (getenv path)
+ (define prop (System.getProperty path))
+ (and (not (eq? prop #null)) prop))
+
;;@ (implementation-vicinity) should be defined to be the pathname of
;;; the directory where any auxillary files to your Scheme
;;; implementation reside.
(define implementation-vicinity
- (let ((implvic (case (software-type)
- ((ms-dos) "C:\\TEMP\\")
- (else "/tmp/"))))
+ (let ((implvic (or (getenv "JSCHEME_IMPLEMENTATION_PATH")
+ (case (software-type)
+ ((ms-dos) "C:\\TEMP\\")
+ (else "/tmp/")))))
(lambda () implvic)))
-(define (getenv path)
- (define prop (System.getProperty path))
- (and (not (eq? prop #null)) prop))
-
(define (slib.zip-on-classpath?)
(let loop ((urls (vector->list (.getURLs (Import.getClassLoader)))))
(if (null? urls) #f
@@ -126,8 +127,7 @@
;@
(define sub-vicinity
(case (software-type)
- ((vms) (lambda
- (vic name)
+ ((vms) (lambda (vic name)
(let ((l (string-length vic)))
(if (or (zero? (string-length vic))
(not (char=? #\] (string-ref vic (- l 1)))))
@@ -167,6 +167,7 @@
;(SLIB:LOAD-COMPILED "filename")
vicinity
srfi-59
+ srfi-96
;; Scheme report features
;; R5RS-compliant implementations should provide all 9 features.
@@ -211,7 +212,7 @@
;; Other common features
-;;; srfi ;srfi-0, COND-EXPAND finds all srfi-*
+;;; srfi-0 ;srfi-0, COND-EXPAND finds all srfi-*
;;; sicp ;runs code from Structure and
;Interpretation of Computer
;Programs by Abelson and Sussman.
@@ -337,10 +338,6 @@
((zero? z2) (+ 1 (* z1 z2)))
(else (expt z1 z2))))))
-;; If your implementation provides R4RS macros:
-;(define macro:eval slib:eval)
-;(define macro:load load)
-
(define (constant? exp)
(if (pair? exp) (eq? (car exp) 'quote) (not (symbol? exp))))
@@ -428,7 +425,6 @@
;@
(define (defmacro:load <pathname>)
(slib:eval-load <pathname> defmacro:eval))
-;; slib:eval-load definition moved to "require.scm"
;@
(define slib:warn
@@ -511,6 +507,14 @@
;;@ At this point SLIB:LOAD must be able to load SLIB files.
(define slib:load slib:load-source)
+;;; If your implementation provides R4RS macros:
+;;(define macro:eval slib:eval)
+;;(define macro:load slib:load-source)
+
+;;; If your implementation provides syntax-case macros:
+;;(define syncase:eval slib:eval)
+;;(define syncase:load slib:load-source)
+
(slib:load (in-vicinity (library-vicinity) "require"))
(define (current-time) (/ (System.currentTimeMillis) 1000))