summaryrefslogtreecommitdiffstats
path: root/STk.init
diff options
context:
space:
mode:
Diffstat (limited to 'STk.init')
-rw-r--r--STk.init42
1 files changed, 22 insertions, 20 deletions
diff --git a/STk.init b/STk.init
index a53fb7c..c73f33a 100644
--- a/STk.init
+++ b/STk.init
@@ -26,7 +26,11 @@
;;; (implementation-vicinity) should be defined to be the pathname of
;;; the directory where any auxillary files to your Scheme
;;; implementation reside.
-(define (implementation-vicinity) "/usr/local/lib/stk/3.99.3/")
+(define implementation-vicinity
+ (let ((impl-path
+ (or (getenv "STK_IMPLEMENTATION_PATH")
+ "/usr/local/lib/stk/3.99.3/")))
+ (lambda () impl-path)))
;;; (library-vicinity) should be defined to be the pathname of the
;;; directory where files of Scheme library functions reside.
@@ -84,8 +88,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)))))
@@ -126,6 +129,7 @@
;(SLIB:LOAD-COMPILED "filename")
vicinity
srfi-59
+ srfi-96
;; Scheme report features
;; R5RS-compliant implementations should provide all 9 features.
@@ -169,11 +173,11 @@
;; 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.
-;;; defmacro ;has Common Lisp DEFMACRO
+ defmacro ;has Common Lisp DEFMACRO
;;; record ;has user defined data structures
string-port ;has CALL-WITH-INPUT-STRING and
;CALL-WITH-OUTPUT-STRING
@@ -256,10 +260,6 @@
;;; eval using the top-level (user) environment.
(define slib:eval eval)
-;;; If your implementation provides R4RS macros:
-;(define macro:eval slib:eval)
-;(define macro:load load)
-
(define *macros* '())
(define-macro (defmacro name args . body)
@@ -267,12 +267,10 @@
(define-macro (,name ,@args) ,@body)
(set! *macros* (cons ,name *macros*))))
-
(define (defmacro? m) (and (memv m *macros*) #t))
-(define macroexpand-1 MACRO-EXPAND-1)
-(define macroexpand MACRO-EXPAND)
-
+(define macroexpand-1 macro-expand-1)
+(define macroexpand macro-expand)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -285,7 +283,6 @@
(define (defmacro:load <pathname>)
(slib:eval-load <pathname> defmacro:eval))
-;; slib:eval-load definition moved to "require.scm"
(define slib:warn
(lambda args
@@ -324,13 +321,21 @@
;;; (SLIB:LOAD-SOURCE "foo") should load "foo.scm" or with whatever
;;; suffix all the module files in SLIB have. See feature 'SOURCE.
-(define slib:load-source LOAD)
+(define slib:load-source load)
;;; (SLIB:LOAD-COMPILED "foo") should load the file that was produced
;;; by compiling "foo.scm" if this implementation can compile files.
;;; See feature 'COMPILED.
(define slib:load-compiled load)
+;;; 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)
+
;;;
;;; Retain original require/provide before loading "require.scm"
;;;
@@ -341,11 +346,8 @@
(define slib:load slib:load-source)
(slib:load (in-vicinity (library-vicinity) "require"))
-
-;;;
-;;; Redefine require/provide so that symbols use SLIB one and strings use STk one
-;;;
-
+;;; Redefine require/provide so that symbols use SLIB one and strings
+;;; use STk one
(define require
(let ((slib:require require))
(lambda (item)