[latex3-commits] [git/LaTeX3-latex3-latex2e] hotfix/gh441: Explicitly tell if order is not set in the top-level chunk (0ac8253f)
PhelypeOleinik
phelype.oleinik at latex-project.org
Sat Dec 12 04:11:53 CET 2020
Repository : https://github.com/latex3/latex2e
On branch : hotfix/gh441
Link : https://github.com/latex3/latex2e/commit/0ac8253f4608031f6a36b66df5444264f0bb4217
>---------------------------------------------------------------
commit 0ac8253f4608031f6a36b66df5444264f0bb4217
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date: Sat Dec 12 00:11:53 2020 -0300
Explicitly tell if order is not set in the top-level chunk
>---------------------------------------------------------------
0ac8253f4608031f6a36b66df5444264f0bb4217
base/lthooks.dtx | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index 8822715f..0fc80722 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -2252,7 +2252,7 @@
% \end{macrocode}
% If the hook exists, its order (if it's reversed or not) is already
% set, so we can just use the correct
-% \cs[no-index]{\tl_gput_\meta{side}:cn}. Otherwise, add the code
+% \cs[no-index]{tl_gput_\meta{side}:cn}. Otherwise, add the code
% chunk with an extra pair of braces so it can be easily revesed
% later if needed.
% \begin{macrocode}
@@ -3451,12 +3451,26 @@
%
% If there is code in the |top-level| token list, print it:
% \begin{macrocode}
- \@@_log_line:x { Document-level~(top-level)~code:}
- \@@_log_line_indent:x
+ \@@_log_line:x
{
- \tl_if_empty:cTF { @@_toplevel~#1 }
- { --- }
- { ->~ \exp_args:Nv \tl_to_str:n { @@_toplevel~#1 } }
+ Document-level~(top-level)~code
+ \bool_lazy_or:nnF
+ { \hook_if_exist_p:n {#1} }
+ { \tl_if_empty_p:c { @@_toplevel~#1 } }
+ { ~(order~not~set~yet) } :
+ }
+ \tl_if_empty:cTF { @@_toplevel~#1 }
+ { \@@_log_line_indent:x { --- } }
+ {
+ \hook_if_exist:nTF {#1}
+ {
+ \@@_log_line_indent:x
+ { -> ~ \exp_args:Nv \tl_to_str:n { @@_toplevel~#1 } }
+ }
+ {
+ \tl_map_inline:cn { @@_toplevel~#1 }
+ { \@@_log_line_indent:x { -> ~ \tl_to_str:n {##1} } }
+ }
}
% \end{macrocode}
%
More information about the latex3-commits
mailing list.