From: Chris Hanson Date: Thu, 12 Feb 1998 04:31:37 +0000 (+0000) Subject: Change ADD-SYSTEM! to replace an existing entry of the same name. X-Git-Tag: 20090517-FFI~4865 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=a9f8e5b8629fcb8ce759cb33c6eba6c30d8da331;p=mit-scheme.git Change ADD-SYSTEM! to replace an existing entry of the same name. --- diff --git a/v7/src/runtime/system.scm b/v7/src/runtime/system.scm index c299332af..3092ecad0 100644 --- a/v7/src/runtime/system.scm +++ b/v7/src/runtime/system.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/system.scm,v 14.8 1991/11/04 20:30:06 cph Exp $ +$Id: system.scm,v 14.9 1998/02/12 04:31:37 cph Exp $ -Copyright (c) 1988-91 Massachusetts Institute of Technology +Copyright (c) 1988-98 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -54,6 +54,12 @@ MIT in each case. |# (define known-systems '()) (define (add-system! system) + (let ((system* + (list-search-positive known-systems + (lambda (system*) + (string=? (system/name system) (system/name system*)))))) + (if system* + (set! known-systems (delq! system* known-systems)))) (set! known-systems (append! known-systems (list system))) unspecific)