From 2b6fcf5b1f6f3cf8d94cada4f00885b275f1a7c5 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Sun, 27 Jan 2013 21:53:49 +0100 Subject: [PATCH] current-ssax-error-port is a parameter * module/sxml/ssax.scm (current-ssax-error-port): Change to be a parameter. --- module/sxml/ssax.scm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/module/sxml/ssax.scm b/module/sxml/ssax.scm index a4de0e3e1..474247ba6 100644 --- a/module/sxml/ssax.scm +++ b/module/sxml/ssax.scm @@ -1,6 +1,6 @@ ;;;; (sxml ssax) -- the SSAX parser ;;;; -;;;; Copyright (C) 2009, 2010,2012 Free Software Foundation, Inc. +;;;; Copyright (C) 2009, 2010,2012,2013 Free Software Foundation, Inc. ;;;; Modified 2004 by Andy Wingo . ;;;; Written 2001,2002,2003,2004 by Oleg Kiselyov as SSAX.scm. ;;;; @@ -170,12 +170,14 @@ (define ascii->char integer->char) (define char->ascii char->integer) -(define *current-ssax-error-port* (make-fluid)) -(define (current-ssax-error-port) - (fluid-ref *current-ssax-error-port*)) +(define current-ssax-error-port + (make-parameter (current-error-port))) + +(define *current-ssax-error-port* + (parameter-fluid current-ssax-error-port)) (define (with-ssax-error-to-port port thunk) - (with-fluids ((*current-ssax-error-port* port)) + (parameterize ((current-ssax-error-port port)) (thunk))) (define (ssax:warn port msg . args)