Function | Package: system | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version

## augment-environment

Arguments: environment &key variable symbol-macro constant function macro declare special-operator block tag compiler-macro flavor-iv reuse locative

This function returns a new environment object created by augmenting environment with the information provided by the keyword aguments.

The keyword argument corresponding to namespaces (variable, symbol-macro, constant, function, macro, special-operator, block, tag, and flavor-iv), locative information can be supplied for each name added. (See variable-information, function-information, tag-information, and block-information for information on appropriate locative values for different objects.) Locative information can be provided for each name by having instead of a list of names for one of the arguments listed above, an alist with the car of each element being the name and the cdr being the locative information.

The keyword arguments are:

- variable: the value should be a list of symbols that will be visible as bound variables in the new environment. Declarations already in the environment or added by the declare keyword argument provide information about these variables (whether they are lexical, or special, for example).
- symbol-macro: the value should be a list of symbol-macro definitions of the form `(``name``` `` `definition``)` (similar to specifications to symbol-macrolet). Thus the new environment will have a symbol-macro binding for each name and macroexpand will be able to expand them correctly. A type declaration for a name added to the declare argument wraps a the form mentioning the type about the definition.
- constant: the value should be a list of symbols that will be visible as constants in the new environment.
- function: the value should be a list of function names that will be visible as local functions in the new environment.
- macro: the value should be a list of macro definitions of the form `(``name``` `` `definition``)` (similar to specifications to macrolet). Each definition must be a function of two arguments (a form and an environment). The new environment will have a local macro binding for each name corresponding to the macro expander function.
- declare: the value should be a list of special operator names that will be visible in the environment. The environment must be a global-environment; either the null lexical environment or a compile-file environment shadowing the global environment (in this case the reuse argument should be specified as true).
- special-operator: the value should be a list of special operator names that will be visible in the new environment.
- block: the value should be a list of block names that will be visible in the new environment.
- tag: the value should be a list of tag names that will be visible in the new environment.
- compiler-macro: the value should be a list of compiler-macro names that will be visible in the environment. The environment must be a global-environment; either the null lexical environment or a compile-file environment shadowing the global environment (in this case the reuse argument should be specified as true).
- flavor-iv: the value should be a list of flavor instance variable names that will be visible in the new environment.
- reuse: when reuse is `nil` (the default) a new environment object is consed, i.e. the environment object returned is not eq to the one given. When reuse is non-`nil`, then the old environment object is returned, and any additions to the environment are added at the same level, as if they had been all added in the same call to augment-environment which created this environment object.
- locative: if only one name is being added by this call to augment-environment, then the locative information for that single name can be provided as the value of this argument, thereby saving the consing necessary to place the locative with the name itself.

Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version