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 --- Template.scm | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'Template.scm') diff --git a/Template.scm b/Template.scm index d24f984..74fb7ea 100644 --- a/Template.scm +++ b/Template.scm @@ -1,4 +1,4 @@ -;;; "Template.scm" configuration template of *features* for Scheme -*-scheme-*- +;;; "Template.scm" configuration template of slib:features for Scheme -*-scheme-*- ;;; Author: Aubrey Jaffer ;;; ;;; This code is in the public domain. @@ -127,9 +127,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") @@ -293,7 +293,7 @@ (define (defmacro:eval x) (base:eval (defmacro:expand* x))) (define (defmacro:expand* x) - (require 'defmacroexpand) (apply defmacro:expand* x '())) + (slib:require 'defmacroexpand) (apply defmacro:expand* x '())) ;@ (define (defmacro:load ) (slib:eval-load defmacro:eval)) @@ -304,12 +304,15 @@ (let ((cep (current-error-port))) (if (provided? 'trace) (print-call-stack cep)) (display "Warn: " cep) - (for-each (lambda (x) (display #\ cep) (write x cep)) args)))) + (for-each (lambda (x) (display #\space cep) (write x cep)) args) + (newline cep)))) ;;@ define an error procedure for the library -(define (slib:error . args) - (if (provided? 'trace) (print-call-stack (current-error-port))) - (apply error args)) +(define slib:error + (let ((error error)) + (lambda args + (if (provided? 'trace) (print-call-stack (current-error-port))) + (apply error args)))) ;@ (define (make-exchanger obj) (lambda (rep) (let ((old obj)) (set! obj rep) old))) @@ -318,7 +321,7 @@ ((r rb) (open-input-file filename)) ((w wb) (open-output-file filename)) (else (slib:error 'open-file 'mode? modes)))) -(define (port? obj) (or (input-port? port) (output-port? port))) +(define (port? obj) (or (input-port? obj) (output-port? obj))) (define (call-with-open-ports . ports) (define proc (car ports)) (cond ((procedure? proc) (set! ports (cdr ports))) -- cgit v1.2.3