From b74885fc7c9fd4ffc80179a1c57a7e2d2d6ff9b2 Mon Sep 17 00:00:00 2001
From: Taylor R Campbell <campbell@mumble.net>
Date: Thu, 7 Oct 2010 05:47:30 +0000
Subject: [PATCH] Fix recent change to SHALLOW-FLUID-BIND.

This works around lossage with unassigned variables:

   (define x)
   (fluid-let ((x 0)) ...)
   ;Unassigned variable: x

This relies on the deprecated semantics of SET! that returns the
variable's old value (or old reference trap, if unassigned).
---
 src/runtime/mit-macros.scm | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/runtime/mit-macros.scm b/src/runtime/mit-macros.scm
index c181de728..bbfe5acb3 100644
--- a/src/runtime/mit-macros.scm
+++ b/src/runtime/mit-macros.scm
@@ -542,10 +542,7 @@ USA.
 	 `(,r-let ,(map list temporaries expressions)
 	    (,r-define (,swap!)
 	      ,@(map (lambda (name temporary)
-		       (let ((temporary* (make-synthetic-identifier 'TEMP)))
-			 `(,r-let ((,temporary* ,temporary))
-			    (,r-set! ,temporary ,name)
-			    (,r-set! ,name ,temporary*))))
+		       `(,r-set! ,name (,r-set! ,temporary (,r-set! ,name))))
 		     names
 		     temporaries)
 	      ,r-unspecific)
-- 
2.25.1