From: Taylor R Campbell Date: Fri, 8 Oct 2010 04:13:46 +0000 (+0000) Subject: Fix recent change to FLUID-LET to support unassigning. X-Git-Tag: 20101212-Gtk~47 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=5b636d3b4801a150b1ca15c5f51908564dcffebc;p=mit-scheme.git Fix recent change to FLUID-LET to support unassigning. Fixes (define x 0) (fluid-let ((x)) ...) ;The object (), passed as an argument to safe-car, is not a pair. --- diff --git a/src/runtime/mit-macros.scm b/src/runtime/mit-macros.scm index bbfe5acb3..461cb8333 100644 --- a/src/runtime/mit-macros.scm +++ b/src/runtime/mit-macros.scm @@ -529,7 +529,7 @@ USA. compare (syntax-check '(KEYWORD (* (FORM ? EXPRESSION)) + FORM) form) (let ((names (map car (cadr form))) - (expressions (map cadr (cadr form))) + (right-hand-sides (map cdr (cadr form))) (r-define (rename 'DEFINE)) (r-lambda (rename 'LAMBDA)) (r-let (rename 'LET)) @@ -539,7 +539,7 @@ USA. (let ((temporaries (map make-synthetic-identifier names)) (swap! (make-synthetic-identifier 'SWAP!)) (body `(,r-lambda () ,@(cddr form)))) - `(,r-let ,(map list temporaries expressions) + `(,r-let ,(map cons temporaries right-hand-sides) (,r-define (,swap!) ,@(map (lambda (name temporary) `(,r-set! ,name (,r-set! ,temporary (,r-set! ,name))))