From: Chris Hanson Date: Mon, 1 Oct 2001 20:40:07 +0000 (+0000) Subject: Fix bug that was causing some variables to erroneously have multiple X-Git-Tag: 20090517-FFI~2534 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=42514e27872e923d5a6e3be106778bab9e4d36b8;p=mit-scheme.git Fix bug that was causing some variables to erroneously have multiple bindings. --- diff --git a/v7/src/cref/redpkg.scm b/v7/src/cref/redpkg.scm index 3225176ea..c6477c6b5 100644 --- a/v7/src/cref/redpkg.scm +++ b/v7/src/cref/redpkg.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: redpkg.scm,v 1.19 2001/09/28 00:38:05 cph Exp $ +$Id: redpkg.scm,v 1.20 2001/10/01 20:40:07 cph Exp $ Copyright (c) 1988-2001 Massachusetts Institute of Technology @@ -588,9 +588,10 @@ USA. (define (bind! package name expression new?) (let ((value-cell (binding/value-cell (intern-binding! package name new?)))) (set-expression/value-cell! expression value-cell) - (set-value-cell/expressions! - value-cell - (cons expression (value-cell/expressions value-cell))))) + (let ((expressions (value-cell/expressions value-cell))) + (if (not (memq expression expressions)) + (set-value-cell/expressions! value-cell + (cons expression expressions)))))) (define (link! source-package source-name destination-package destination-name