aboutsummaryrefslogtreecommitdiffstats
path: root/elk.init
diff options
context:
space:
mode:
Diffstat (limited to 'elk.init')
-rw-r--r--elk.init40
1 files changed, 24 insertions, 16 deletions
diff --git a/elk.init b/elk.init
index e85a908..3021352 100644
--- a/elk.init
+++ b/elk.init
@@ -35,11 +35,15 @@
;;; (implementation-vicinity) should be defined to be the pathname of
;;; the directory where any auxillary files to your Scheme
;;; implementation reside.
-(define (implementation-vicinity)
- (case (software-type)
- ((unix) "/usr/share/elk/")
- ((vms) "scheme$src:")
- ((ms-dos) "C:\\scheme\\")))
+(define implementation-vicinity
+ (let ((impl-path
+ (or (getenv "ELK_IMPLEMENTATION_PATH")
+ (case (software-type)
+ ((unix) "/usr/share/elk/")
+ ((vms) "scheme$src:")
+ ((ms-dos) "C:\\scheme\\")
+ (else "")))))
+ (lambda () impl-path)))
;;; (library-vicinity) should be defined to be the pathname of the
;;; directory where files of Scheme library functions reside.
@@ -107,8 +111,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)))))
@@ -148,6 +151,7 @@
;(SLIB:LOAD-COMPILED "filename")
vicinity
srfi-59
+ srfi-96
;; Scheme report features
;; R5RS-compliant implementations should provide all 9 features.
@@ -191,11 +195,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
@@ -217,9 +221,9 @@
;------------
-(define program-arguments
- (lambda ()
- (cons "undefined-program-name" (command-line-args))))
+(define (program-arguments)
+ (cons (symbol->string (scheme-implementation-type))
+ (command-line-args)))
; EXACT? appears to always return #f which isn't very useful.
; Approximating it with INTEGER? at least means that some
@@ -352,10 +356,6 @@
(define defmacro:eval slib:eval)
(define defmacro:load load)
-;;; If your implementation provides R4RS macros:
-;(define macro:eval slib:eval)
-;(define macro:load load)
-;; slib:eval-load definition moved to "require.scm"
(define slib:warn
(lambda args
@@ -432,4 +432,12 @@
;;; At this point SLIB:LOAD must be able to load SLIB files.
(define slib:load slib:load-source) ;WARNING: redefining 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)
+
(slib:load (in-vicinity (library-vicinity) "require"))