| Allegro CL version 8.2 Unrevised from 8.1 to 8.2. 8.1 version |
Arguments: symbol arglist &body body
def-function-spec-handler defines a new kind of function spec handler keyed on symbol, a symbol which is the fspec-first of the function spec. The handler must accept three arguments so arglist must be a list of three elements. The arguments are:
The body must return an appropriate value for the operation. The operations are:
:validate |
Return a boolean indicating whether the place named by the spec exists. This must never signal error. |
fboundp |
Return the function if the function is defined and return nil
if the function is not defined. An error must never be signaled on a validated function
spec. |
:setfable |
A boolean indicating whether (setf fdefinition) is allowed. |
setf |
Set the function to the third (extra) argument value. |
boundp |
Boolean whether fmakunbound is allowed. Note that this is not the same meaning as the CL function boundp. |
fmakunbound |
Make the function funbound. |
block |
For certain functions (e.g. setf functions) defun is required to wrap the body in a block with a certain name. This operation must return the name based on the spec and is called by the defun macro and the compiler top level. This is a good place to put an error check for functions that may not be defined by defun. |
unintern |
Detach the function-spec from its "oblist" for potential garbage-collection of the entire function spec. Does not do an fmakunbound; i.e. if an operation has squirrelled the function-spec away, it remains fully operational, just as unintern of an fboundp symbol still leaves it fboundp. |
The function function-name-p returns true when passed a valid function spec defined with def-function-spec-handler. fboundp can be used to determine whether a valid function spec defined with def-function-spec-handler actually names an operator.
See Function specs in implementation.htm for more information on function specs.
Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.
| Allegro CL version 8.2 Unrevised from 8.1 to 8.2. 8.1 version |