This file is copyright (c) 2004,2005,2006 by Panu Kalliokoski
and released under the license in ../LICENSE

End a document.

Try to make sure everything is closed.  (This is not perfect; for
example the sectioning system of docbook-xml is not invoked.
Docbook-xml sections don't play nicely with diversions anyway.)
{{{
w_newindent(0)`'w_setblocktype(n)`'w_softpara`'dnl
}}}

Close the default environment begun in begin.m4 and check everything
went as should.  Then, prepare for the actual output (the template).
{{{
w_end(n)`'w_check_env`'w_enddiv(body)`'w_check_div`'divert(0)dnl
}}}
