aboutsummaryrefslogtreecommitdiffstats
path: root/guile.init
diff options
context:
space:
mode:
Diffstat (limited to 'guile.init')
-rw-r--r--guile.init51
1 files changed, 26 insertions, 25 deletions
diff --git a/guile.init b/guile.init
index de77645..453e382 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))
@@ -43,13 +43,17 @@
;;; (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* ((path (or (%search-load-path "ice-9/q.scm")
- (error "Could not find ice-9/q.scm in " %load-path)))
- (vic (substring path 0 (- (string-length path) 11))))
- (lambda () vic)))
+;; (define implementation-vicinity
+;; (let* ((path (or (%search-load-path "ice-9/q.scm")
+;; (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.
@@ -64,6 +68,9 @@
(and path (substring path 0 (- (string-length path) 10))))
;; Use this path if your scheme does not support GETENV
;; or if SCHEME_LIBRARY_PATH is not set.
+;; Changed from /usr/lib/slib to /usr/share/slib by tb@debian.org for
+;; Debian packaging.
+;; "/usr/lib/slib/"
"/usr/share/slib/"
(in-vicinity (implementation-vicinity) "slib/"))))
(lambda () library-path)))
@@ -115,8 +122,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 +158,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 +172,7 @@
;(SLIB:LOAD-COMPILED "filename")
vicinity
srfi-59
+ srfi-96
;; Scheme report features
;; R5RS-compliant implementations should provide all 9 features.
@@ -203,7 +217,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 +245,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 +381,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 +456,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)