Variable
defpackage
is used on an existing package that is different from the definition given. hcl
(:warn :modify)
defpackage
does if the named package already exists and is in a different state to that described by thedefpackage
form. The variable*handle-existing-defpackage*
is an extension to Common Lisp which allows you to select between alternative behaviors that are known to be useful. defpackage
but missing from the package. You can also control whether a condition is signalled. :error
Signal an error.
:warn
Signal a warning.
:add
Add the new symbols to the externals, imports, and so on.
:modify
Modify the package to have only these externals.
:verbose
The signalled errors or warnings also contain details of the differences.
:error
and:warn
cannot be specified at the same time. One of:add
and:modify
must be specified. Undistinguished internals (that is, internal symbols that are not imported or shadowed),:intern
options and sizes are ignored when deciding whether to signal. :modify
some symbols can be uninterned ifdefpackage
imports another symbol with the same name from another package through:import-from
,:shadowing-import-from
or:export
. This happens whether the symbol has a definition as a function, a variable, or nay other Lisp construct, so after making such a change in the package, you should re-execute the definitions that were (presumably erroneously) attached to the uninterned symbols. *handle-existing-defpackage*
is an extension to Common Lisp. defpackage