From 4396373e96ab5c7a7c6a0a033c29b8bd9a32a14f Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 17 Apr 2002 15:02:21 +0000 Subject: [PATCH] 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. --- v7/src/runtime/mit-syntax.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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) -- 2.25.1