The Common Lisp HyperSpec discusses what an environment is. It also discusses environment objects and tells us that their nature is implementation-dependent. Some functions, like MACROEXPAND, take an optional environment object argument.
What I can’t find is an example of how I actually get an environment object or modify it, or how else I would actually use it. None of the examples in the MACROEXPAND page feature an environment object, not even those examples involving lexical environments – these instead use MACROLET. Common Lisp the Language, 2nd Edition has an AUGMENT-ENVIRONMENT function but apparently this is not in the standard.
Are there functions that can actually obtain and manipulate environments? If not, why do functions like MACROEXPAND take an environment argument? I saw this prior question but it does not seem to answer this issue.