The CLOS symbols are EXPORT
ed from the package “CLOS”.
“COMMON-LISP” uses (as in USE-PACKAGE
) “CLOS” and EXT:RE-EXPORT
s the
[ANSI CL standard] standard exported symbols (the CLISP extensions, e.g.,
those described in Chapter 29, Meta-Object Protocol, are not EXT:RE-EXPORT
ed).
Since the default :USE
argument
to MAKE-PACKAGE
is “COMMON-LISP”, the standard CLOS symbols are normally
visible in all user-defined packages.
If you do not want them (for example, if you want to use the
PCL
implementation of CLOS instead of the native one), do the following:
(DEFPACKAGE
"CL-NO-CLOS" (:use "CL")) (DO-EXTERNAL-SYMBOLS
(symbol
“COMMON-LISP”) (SHADOW
symbol
"CL-NO-CLOS")) (DO-SYMBOLS
(symbol
"CL-NO-CLOS") (EXPORT
symbol
"CL-NO-CLOS")) (IN-PACKAGE
"CL-NO-CLOS") (LOAD
"pcl") ; or whatever (DEFPACKAGE
"MY-USER" (:use "CL-NO-CLOS")) (IN-PACKAGE
"MY-USER") ;; your code which uses PCL goes here
These notes document CLISP version 2.49 | Last modified: 2010-07-07 |