VARIABLE-INFORMATION (NAME &OPTIONAL ENV)
Return information about the variable name VAR in the lexical environment ENV. Note that the global binding may differ from the local one. This function returns three values. The first indicated the type of the variable binding: NIL There is no apparent binding for NAME. :SPECIAL NAME refers to a special variable. :LEXICAL NAME refers to a lexical variable. :SYMBOL-MACRO NAME refers to a symbol macro. :CONSTANT NAME refers to a named constant defined using DEFCONSTANT, or NAME is a keyword. :GLOBAL NAME refers to a global variable. (SBCL specific extension.) :ALIEN NAME refers to an alien variable. (SBCL specific extension.) The second value is true if NAME is bound locally. This is currently always NIL for special variables, although arguably it should be T when there is a lexically apparent binding for the special variable. The third value is an alist describind the declarations that apply to the function NAME. Standard declaration specifiers that may appear in CARS of the alist include: DYNAMIC-EXTENT If the CDR is T, NAME has been declared DYNAMIC-EXTENT. If the CDR is NIL, the alist element may be omitted. IGNORE If the CDR is T, NAME has been declared IGNORE. If the CDR is NIL, the alist element may be omitted. TYPE The CDR is the type specifier associated with NAME, or the symbol T if there is explicit type declaration or proclamation associated with NAME. The type specifier may be equivalent to or a supertype of the original declaration. If the CDR is T the alist element may be omitted. SB-EXT:ALWAYS-BOUND If CDR is T, NAME has been declared as SB-EXT:ALWAYS-BOUND (SBCL specific.) In addition to these declarations defined using DEFINE-DECLARATION may appear.