From: Chris Hanson Date: Wed, 17 Apr 2002 15:02:21 +0000 (+0000) Subject: Don't reserve names in top-level environments. The revised report X-Git-Tag: 20090517-FFI~2189 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=4396373e96ab5c7a7c6a0a033c29b8bd9a32a14f;p=mit-scheme.git Don't reserve names in top-level environments. The revised report requires that top-level definitions act like assignments when the name is already bound. --- diff --git a/v7/src/runtime/mit-syntax.scm b/v7/src/runtime/mit-syntax.scm index aa1194fb1..7f138d27b 100644 --- a/v7/src/runtime/mit-syntax.scm +++ b/v7/src/runtime/mit-syntax.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: mit-syntax.scm,v 14.5 2002/03/01 03:09:54 cph Exp $ +;;; $Id: mit-syntax.scm,v 14.6 2002/04/17 15:02:21 cph Exp $ ;;; ;;; Copyright (c) 1989-1991, 2001, 2002 Massachusetts Institute of Technology ;;; @@ -240,9 +240,10 @@ (define (classify/define form environment definition-environment history binding-theory) - (syntactic-environment/define definition-environment - (cadr form) - (make-reserved-name-item history)) + (if (not (syntactic-environment/top-level? definition-environment)) + (syntactic-environment/define definition-environment + (cadr form) + (make-reserved-name-item history))) (binding-theory definition-environment (cadr form) (classify/subexpression (caddr form)