Checks for existing definitions and records a new definition.
dspec
record-definition dspec location &key check-redefinition-p => result
dspec⇩ |
A dspec. |
location⇩ |
A pathname or keyword. |
check-redefinition-p⇩ |
A boolean. |
result⇩ |
A generalized boolean. |
The function record-definition
tells the system that dspec is defined at location.
The system-provided definer macros call the function record-definition
with the current location.
location should be a pathname or keyword as returned by location.
When check-redefinition-p is true (the default) and the same name has already been defined in a different location (or more than once in the same file) then warning or error is signaled depending on the value of *redefinition-action*. Otherwise, there is no check for existing definitions.
If the definition is made, then result is true. If the definition is not made then result is nil
. This can happen if you choose the "Don't redefine ..."
restart at a redefinition error.
You should not usually call record-definition
, since all the system-provided definers call it. However, for new classes of definition which you add with define-dspec-class, you should call record-definition
for dspecs in their new classes.
record-definition
was documented in the lispworks
package in LispWorks 4.3 and earlier. Although it is currently still available there, this may change in future releases and you should now reference it via the dspec
package.
define-dspec-class
*redefinition-action*
location
7.7.2 Recording definitions and redefinition checking
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:33