gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gcl-devel] Re: "COMMON-LISP" package in GCL 2.5.0


From: Matt Kaufmann
Subject: Re: [Gcl-devel] Re: "COMMON-LISP" package in GCL 2.5.0
Date: Sat, 10 Aug 2002 15:19:25 -0500 (CDT)

Hi, Camm --

>> Greetings!  If you can let me know where this patch goes in the acl2
>> tree, I might try it if/when I get some time.  Is there a shorter
>> regression test that 3 hours???

Sure.  It's in file acl2.lisp; just replace the form under the following
comment in that file with the (obviously similar) form below.  If you prefer
that I email you the entire revised file, let me know and I'll be happy to do
that.

;                              PACKAGES

; We never intend that this file should be compiled, and hence we do
; not need to obey the CLTL1 strictures about putting all IN-PACKAGE
; forms near the front.

; Make "COMMON-LISP" a nickname for "LISP" if "LISP" is defined, unless
; "COMMON-LISP" is already defined.  This is important for GCL, so that the
; printed version of a symbol in the "LISP" package (which will show as being
; in "COMMON-LISP") can be read back in.  This code could be weakened so that
; it only has an effect if "LISP" is the main lisp package, but that is likely
; the case anyhow if the "LISP" package is defined (as in GCL).
(let ((lisp-pkg (find-package "LISP")))
  (if lisp-pkg
      (let ((cl-pkg (find-package "COMMON-LISP")))
        (cond
         ((and cl-pkg (eq cl-pkg lisp-pkg)))
         (t
          (when cl-pkg ; but by the test above, cl-pkg is not lisp-pkg
            #-gcl
            (error "This Lisp is unsuitable for ACL2, because the ~
                    COMMON-LISP~% package is defined but is not the LISP ~
                    package.")
            #+gcl

; GCL 2.5.0 has a "COMMON-LISP" package that is initially populated only with
; LISP::T and LISP::NIL.  It seems safe to move any GCL COMMON-LISP package out
; of the way before we make "COMMON-LISP" a nickname for "LISP".

            (rename-package "COMMON-LISP" "COMMON-LISP-renamed"))
          (let ((old-name (package-name lisp-pkg)) ; reuse old name, nicknames
                (old-nicknames (package-nicknames lisp-pkg)))
            (rename-package "LISP"
                            old-name
                            (cons "COMMON-LISP" old-nicknames))))))))

Thanks --
-- Matt




reply via email to

[Prev in Thread] Current Thread [Next in Thread]