A means to save documentation from locally-included events.
Archive-xdoc lets you include some books or other events locally in an encapsulate while keeping the xdoc documentation that they contain.
Usage: To archive the xdoc from some events:
(archive-xdoc <events>)
This produces an encapsulate that only locally runs the given events, so that after running this form the events do not remain in the logical world. However, archive-xdoc saves any new xdoc documentation created by these events, after partially preprocessing it to remove references to definitions that might no longer exist. In particular, it expands forms such as @(def ...), @(formals ...), etc., and evaluates @(`...`) directives.
This process assumes that at the point of saving the xdoc, the definitions referenced in these preprocessor forms exist and the @(`...`) forms can be evaluated. If the documentation loaded in the archive-xdoc form references definitions that aren't loaded, then the preprocessing will produce xdoc-errors and leave notes behind in the documentation saying that those definitions couldn't be found.