The variable *packages-for-warn-on-redefinition*
is a list of package names or the keyword :implementation
, specifying packages which are "protected". For "protected" packages, LispWorks checks before defining (using any of the definer macros like cl:defun
, cl:defclass
and so on) any external symbol of these packages, and takes the action specified by *handle-warn-on-redefinition* (which defaults to signaling an error).
The symbol :implementation
in *packages-for-warn-on-redefinition*
indicates all of the packages which are part of the LispWorks implementation. That includes all the documented packages, including COMMON-LISP and KEYWORD but excluding some "user" packages like CL-USER and KW-USER, and some packages that are used internally.
For symbol value, setting and rebinding is not checked, but defining using definer macros like cl:defvar
and cl:defparameter
is checked.
:implementation
from the list. In situations when this is required, you should do it by rebinding *packages-for-warn-on-redefinition*
rather than setting it.cl:stream
as a function gives an error (by default), even though cl:stream
has only a class definition, and trying to define cl:car
as a class also errors even though cl:car
has only a function definition.:implementation
.
:implementation
is new in LispWorks 7.0.
In LispWorks 6.1 and earlier versions, the list could contain only package names, and the initial value was a long list of package names.
LispWorks User Guide and Reference Manual - 13 Feb 2015