Prevent internally defining a name from causing a duplicate name
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sat, 19 Feb 1994 15:39:30 +0000 (15:39 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sat, 19 Feb 1994 15:39:30 +0000 (15:39 +0000)
error.

v7/src/runtime/lambdx.scm

index 195d5012f70bd671314562e2e7c461bc2a851c03..21152ee0e09e5f803bc12de613a1467ba48783cf 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/lambdx.scm,v 14.4 1994/01/29 21:53:03 adams Exp $
+$Id: lambdx.scm,v 14.5 1994/02/19 15:39:30 gjr Exp $
 
-Copyright (c) 1988, 1990 Massachusetts Institute of Technology
+Copyright (c) 1988-1994 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -38,9 +38,17 @@ MIT in each case. |#
 (declare (usual-integrations))
 \f
 (define (make-lambda* name required optional rest body)
-  (scan-defines body
-    (lambda (auxiliary declarations body*)
-      (make-lambda name required optional rest auxiliary declarations body*))))
+  (scan-defines
+   body
+   (lambda (auxiliary declarations body*)
+     (let ((ordinary (append required optional (if rest (list rest) '()))))
+       (make-lambda name required optional rest
+                   (list-transform-negative auxiliary
+                     (lambda (aux)
+                       (memq aux ordinary)))
+                   auxiliary
+                   declarations
+                   body*)))))
 
 (define (lambda-components* *lambda receiver)
   (lambda-components *lambda