From 4684239efa63dc1b2c1cbe37ef7d3062029f5532 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 20 Feb 2017 00:05:40 -0800 Subject: Import Upstream version 3b1 --- guile.init | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) (limited to 'guile.init') 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 (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 . ) (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) -- cgit v1.2.3