DEFINE-DECLARATION-RETURN-VALUEDEFINE-DECLARATION (added to the language at the June 89 meeting) only permits a declaration to apply either to variable bindings, to function bindings, or to neither. The first return value from the handler function indicates which of these cases it is, and the second return value is a list containing information about the declaration.
The DYNAMIC-EXTENT declaration cannot be handled with this mechanism since it can apply to both variable and function bindings. It seems reasonable for both users and implementations to define other kinds of declarations that use a similar syntax, and DEFINE-DECLARATION ought to be able to handle these cases.
DEFINE-DECLARATION to require handler functions to return three values.
The first value is a list which corresponds to information about variable bindings specified by the declaration. The format of this list is the same as is now required to be returned as the second value of DEFINE-DECLARATION when the first value is :VARIABLE; that is, a list of (binding-name key value) lists.
The second value is a list which corresponds to information about function bindings specified by the declaration. The format of this list is the same as is now required to be returned as the second value of DEFINE-DECLARATION when the first value is :FUNCTION; that is, a list of (binding-name key value) lists.
The third value is a list which corresponds to information about declarations that do not apply to either variable or function bindings. The format of this list is the same as is now required to be returned as the second value of DEFINE-DECLARATION when the first value is :DECLARE; that is, a list whose CAR is a key (used by the function DECLARATION-INFORMATION) and whose CDR is the associated return value.
DEFINE-DECLARATION, while minimizing the change to the format of the information that is returned.DEFINE-DECLARATION (as originally specified in issue SYNTACTIC-ENVIRONMENT-ACCESS) yet?DEFINE-DECLARATION is made more powerful.