implement lazy declaration at begin of documentation when caching is active

This commit is contained in:
Maximilian Keßler 2022-01-31 19:26:38 +01:00
parent b041d8c990
commit 32daab8d20
2 changed files with 26 additions and 10 deletions

View file

@ -2276,17 +2276,9 @@
{ \@@_Declarator: GroupedTheorem } { \@@_Declarator: GroupedTheorem }
{ s O{} m } { s O{} m }
{ {
\bool_if:nTF \bool_if:NTF \g_@@_cache_bool
{ {
\g_@@_cache_bool \hook_gput_code:nnn {@@/definelazy} { groupthm }
&&
\int_compare_p:n
{
\g_@@_cache_version_aux_int < \g_@@_cache_version_document_int
}
}
{
\hook_gput_code:nnn {@@/lazy} { groupthm }
} }
{ {
\use:n \use:n
@ -2659,6 +2651,30 @@
% %
% %
% \subsection{Caching} % \subsection{Caching}
%
%
%
%
% \begin{macrocode}
\hook_gput_code:nnn { begindocument } { groupthm }
{
\bool_if:nTF
{
\g_@@_cache_bool
&&
\int_compare_p:n
{
\g_@@_cache_version_aux_int < \g_@@_cache_version_document_int
}
}
{
\hook_use_once:n { @@ / define lazy }
}
{
}
}
% \end{macrocode}
%
% %
% %
% %