summaryrefslogtreecommitdiffstats
path: root/guile.init
diff options
context:
space:
mode:
Diffstat (limited to 'guile.init')
-rw-r--r--guile.init38
1 files changed, 18 insertions, 20 deletions
diff --git a/guile.init b/guile.init
index e51381a..1b59833 100644
--- a/guile.init
+++ b/guile.init
@@ -3,7 +3,7 @@
;;;
;;; This code is in the public domain.
-(if (not (and (string<=? "1.6" (version)) (string<? (version) "1.7")))
+(if (not (and (string<=? "1.6" (version)) (string<? (version) "1.8.3")))
(define-module (ice-9 slib))) ; :no-backtrace
(define slib-module (current-module))
@@ -48,8 +48,12 @@
;; (error "Could not find ice-9/q.scm in " %load-path)))
;; (vic (substring path 0 (- (string-length path) 11))))
;; (lambda () vic)))
+;;
;;; Rob Browning says %site-dir exists since Guile-1.6
-(define implementation-vicinity %site-dir)
+(define implementation-vicinity
+ (cond ((and (defined? 'getenv) (getenv "GUILE_IMPLEMENTATION_PATH"))
+ => (lambda (path) (lambda () path)))
+ (else %site-dir)))
;;; (library-vicinity) should be defined to be the pathname of the
;;; directory where files of Scheme library functions reside.
@@ -115,8 +119,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)))))
@@ -152,6 +155,13 @@
;;; initially supported by this implementation.
(define slib:features
(append
+ (apply append
+ (map (lambda (sym) (if (defined? sym) (list sym) '()))
+ '(getenv
+ program-arguments
+ current-time
+ char-ready?)))
+
'(
source ;can load scheme source files
;(SLIB:LOAD-SOURCE "filename")
@@ -159,6 +169,7 @@
;(SLIB:LOAD-COMPILED "filename")
vicinity
srfi-59
+ srfi-96
;; Scheme report features
;; R5RS-compliant implementations should provide all 9 features.
@@ -203,7 +214,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.
@@ -231,19 +242,7 @@
array
array-for-each
- )
-
- (if (defined? 'getenv)
- '(getenv)
- '())
-
- (if (defined? 'current-time)
- '(current-time)
- '())
-
- (if (defined? 'char-ready?)
- '(char-ready?)
- '())))
+ )))
;;@ (FILE-POSITION <port> . <k>)
(define (file-position port . args)
@@ -379,7 +378,6 @@
(let ((ie (interaction-environment)))
(lambda (expression)
(eval expression ie)))))
-;; slib:eval-load definition moved to "require.scm"
;;; Define SLIB:EXIT to be the implementation procedure to exit or
;;; return if exiting not supported.
@@ -455,7 +453,7 @@
;;; If your implementation provides R4RS macros:
(define macro:eval slib:eval)
-(define macro:load slib:load)
+(define macro:load slib:load-source)
(define slib:warn warn)
(define slib:error error)