aboutsummaryrefslogtreecommitdiffstats
path: root/guile.init
diff options
context:
space:
mode:
authorThomas Bushnell, BSG <tb@debian.org>2008-02-04 20:29:13 -0500
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:41 -0800
commit71dab84adaa579f9386dd8ee09006d3cac625723 (patch)
tree8022514642d25edffdb4bdd130020674b0efd844 /guile.init
parent897451458bd8eec628c7bbfaccba0dd069830f0f (diff)
parent4684239efa63dc1b2c1cbe37ef7d3062029f5532 (diff)
downloadslib-71dab84adaa579f9386dd8ee09006d3cac625723.tar.gz
slib-71dab84adaa579f9386dd8ee09006d3cac625723.zip
Import Debian changes 3b1-1debian/3b1-1
slib (3b1-1) unstable; urgency=low * New upstream release. * guile.init (library-vicinity): Repeat change from 3a4-2. * slib.texi (Library Catalogs): Repeat change from 3a3-3. * slib.sh: Repeat change from 3a5-3. * slib.1: Repeat change from 3a5-4. * Makefile: Repeat change from 3a2-1.
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)