Macro define-package




  define-package PACKAGE &REST CLAUSESform

Arguments and Values:


DEFINE-PACKAGE takes a PACKAGE and a number of CLAUSES, of the form (KEYWORD . ARGS). DEFINE-PACKAGE supports the following keywords: USE, SHADOW, SHADOWING-IMPORT-FROM, IMPORT-FROM, EXPORT, INTERN -- as per CL:DEFPACKAGE. RECYCLE -- Recycle the package's exported symbols from the specified packages, in order. For every symbol scheduled to be exported by the DEFINE-PACKAGE, either through an :EXPORT option or a :REEXPORT option, if the symbol exists in one of the :RECYCLE packages, the first such symbol is re-homed to the package being defined. For the sake of idempotence, it is important that the package being defined should appear in first position if it already exists, and even if it doesn't, ahead of any package that is not going to be deleted afterwards and never created again. In short, except for special cases, always make it the first package on the list if the list is not empty. MIX -- Takes a list of package designators. MIX behaves like (:USE PKG1 PKG2 ... PKGn) but additionally uses :SHADOWING-IMPORT-FROM to resolve conflicts in favor of the first found symbol. It may still yield an error if there is a conflict with an explicitly :SHADOWING-IMPORT-FROM symbol. REEXPORT -- Takes a list of package designators. For each package, p, in the list, export symbols with the same name as those exported from p. Note that in the case of shadowing, etc. the symbols with the same name may not be the same symbols. UNINTERN -- Remove symbols here from PACKAGE.