From: Chris Hanson Date: Tue, 23 Nov 2004 19:38:48 +0000 (+0000) Subject: Modify transcript support to allow it to be used on any port. X-Git-Tag: 20090517-FFI~1439 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=05633410aa37bad55f33a542b3cd9464e3b556e6;p=mit-scheme.git Modify transcript support to allow it to be used on any port. --- diff --git a/v7/src/runtime/tscript.scm b/v7/src/runtime/tscript.scm index 5e2e6c2bd..4709a9f44 100644 --- a/v7/src/runtime/tscript.scm +++ b/v7/src/runtime/tscript.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: tscript.scm,v 1.8 2004/11/04 03:00:47 cph Exp $ +$Id: tscript.scm,v 1.9 2004/11/23 19:38:48 cph Exp $ Copyright 1990,1999,2004 Massachusetts Institute of Technology @@ -28,14 +28,14 @@ USA. (declare (usual-integrations)) -(define (transcript-on filename) - (let ((port (nearest-cmdl/port))) +(define (transcript-on filename #!optional port) + (let ((port (if (default-object? port) (nearest-cmdl/port) port))) (if (port/transcript port) (error "Transcript already turned on.")) (set-port/transcript! port (open-output-file filename)))) -(define (transcript-off) - (let ((port (nearest-cmdl/port))) +(define (transcript-off #!optional port) + (let ((port (if (default-object? port) (nearest-cmdl/port) port))) (let ((transcript-port (port/transcript port))) (if transcript-port (begin