From 42514e27872e923d5a6e3be106778bab9e4d36b8 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 1 Oct 2001 20:40:07 +0000 Subject: [PATCH] Fix bug that was causing some variables to erroneously have multiple bindings. --- v7/src/cref/redpkg.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 -- 2.25.1