If name is a function name, the functional definition of that name is that established by the innermost lexically enclosing flet, labels, or macroletform, if there is one. Otherwise the global functional definition of the function name is returned.

It is an error to use function on a function name that does not denote a function in the lexical environment in which the function form appears. Specifically, it is an error to use function on a symbol that denotes a macro or special form. An implementation may choose not to signal this error for performance reasons, but implementations are forbidden from defining the failure to signal an error as a useful behavior.