From 5bea21e81ed516440e34e480f2c33ca41aa8c597 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 20 Feb 2017 00:05:36 -0800 Subject: Import Upstream version 3a4 --- mitscheme.init | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'mitscheme.init') diff --git a/mitscheme.init b/mitscheme.init index 6283230..be3df51 100644 --- a/mitscheme.init +++ b/mitscheme.init @@ -136,9 +136,9 @@ thunk (lambda () (exchange old))))))) -;;@ *FEATURES* is a list of symbols naming the (SLIB) features +;;@ SLIB:FEATURES is a list of symbols naming the (SLIB) features ;;; initially supported by this implementation. -(define *features* +(define slib:features '( source ;can load scheme source files ;(SLIB:LOAD-SOURCE "filename") @@ -225,12 +225,12 @@ (define mit-scheme-has-r4rs-macros? (mit-scheme-release>= 7 7)) (if mit-scheme-has-r4rs-macros? - (set! *features* (cons 'macro *features*))) + (set! slib:features (cons 'macro slib:features))) (if (get-subsystem-version-string "6.001") ;; Runs code from "Structure and Interpretation of Computer ;; Programs" by Abelson and Sussman. - (set! *features* (cons 'sicp *features*))) + (set! slib:features (cons 'sicp slib:features))) (define current-time current-file-time) (define difftime -) @@ -413,12 +413,14 @@ (apply warn args)) ;; define an error procedure for the library -(define (slib:error first . args) - (if (provided? 'trace) (print-call-stack (current-error-port))) - (case first - ((wrong-type-argument) (apply error:wrong-type-argument args)) - ((bad-range-argument) (apply error:bad-range-argument args)) - (else (apply error first args)))) +(define slib:error + (let ((error error)) + (lambda (first . args) + (if (provided? 'trace) (print-call-stack (current-error-port))) + (case first + ((wrong-type-argument) (apply error:wrong-type-argument args)) + ((bad-range-argument) (apply error:bad-range-argument args)) + (else (apply error first args)))))) ;; define these as appropriate for your system. (define slib:tab (name->char "tab")) -- cgit v1.2.3