[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: Add false branches for logging (6e97bbe5)
PhelypeOleinik
phelype.oleinik at latex-project.org
Fri Sep 11 09:38:38 CEST 2020
Repository : https://github.com/latex3/latex2e
On branch : develop
Link : https://github.com/latex3/latex2e/commit/6e97bbe5029b9f6a7cc5b3fb67eae169d328ef23
>---------------------------------------------------------------
commit 6e97bbe5029b9f6a7cc5b3fb67eae169d328ef23
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date: Fri Sep 11 04:38:38 2020 -0300
Add false branches for logging
>---------------------------------------------------------------
6e97bbe5029b9f6a7cc5b3fb67eae169d328ef23
base/lthooks.dtx | 15 ++++++++++-----
base/testfiles-lthooks/lthooks-009.tlg | 4 ++++
base/testfiles-lthooks/lthooks-010.tlg | 3 +++
base/testfiles-lthooks/lthooks-019.tlg | 2 ++
base/testfiles-lthooks2/lthooks2-002.tlg | 4 ++++
base/testfiles-lthooks2/lthooks2-006.tlg | 10 ++++++++++
6 files changed, 33 insertions(+), 5 deletions(-)
diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index 46c197a0..03ecc080 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -3251,7 +3251,7 @@
% \end{macrocode}
%
% \begin{macrocode}
- \bool_lazy_and:nnT
+ \bool_lazy_and:nnTF
{ \hook_if_exist_p:n {#1} }
{ ! \hook_if_empty_p:n {#1} }
{ \iow_term:x { ~Execution~ order
@@ -3266,8 +3266,14 @@
:
}
\iow_term:x
- { \@spaces \clist_use:cn {g_@@_#1_labels_clist} { ,~ } }
+ {
+ \@spaces
+ \clist_if_empty:cTF { g_@@_#1_labels_clist }
+ { --- }
+ { \clist_use:cn {g_@@_#1_labels_clist} { ,~ } }
+ }
}
+ { #2 { ~Execution~order~not~set~yet. } }
}
{ \iow_term:n { ~The~hook~is~empty. } }
\iow_term:n { }
@@ -3278,9 +3284,8 @@
% \cs{AddToHookNext} we have to remove the first two tokens at the
% front which are \cs{tl_gclear:N} and the token list to clear.
% \begin{macrocode}
-\cs_new:Npn \@@_log_next_code:n #1 {
- \exp_args:No \tl_to_str:n {\use_none:nn #1}
-}
+\cs_new:Npn \@@_log_next_code:n #1
+ { \exp_args:No \tl_to_str:n { \use_none:nn #1 } }
% \end{macrocode}
% \end{macro}
%
diff --git a/base/testfiles-lthooks/lthooks-009.tlg b/base/testfiles-lthooks/lthooks-009.tlg
index fb7944cc..591b78fd 100644
--- a/base/testfiles-lthooks/lthooks-009.tlg
+++ b/base/testfiles-lthooks/lthooks-009.tlg
@@ -77,6 +77,7 @@ The hook 'hook':
Rules:
---
Execution order:
+ ---
Use 'hook': \__hook_clear_next:n {hook}Hello, \AddToHookNext {hook}{nested}world!
The hook 'hook':
Code chunks:
@@ -86,6 +87,7 @@ The hook 'hook':
Rules:
---
Execution order:
+ ---
and again: \__hook_clear_next:n {hook}Hello, \AddToHookNext {hook}{nested}world!
The hook 'hook':
Code chunks:
@@ -95,6 +97,7 @@ The hook 'hook':
Rules:
---
Execution order:
+ ---
once more: \__hook_clear_next:n {hook}Hello, \AddToHookNext {hook}{nested}world!
The hook 'hook':
Code chunks:
@@ -104,6 +107,7 @@ The hook 'hook':
Rules:
---
Execution order:
+ ---
Absolute page = 1 (target: 1)
[1
] (lthooks-009.aux)
diff --git a/base/testfiles-lthooks/lthooks-010.tlg b/base/testfiles-lthooks/lthooks-010.tlg
index 1ccec95c..06aa1d01 100644
--- a/base/testfiles-lthooks/lthooks-010.tlg
+++ b/base/testfiles-lthooks/lthooks-010.tlg
@@ -100,6 +100,7 @@ The hook 'enddocument':
---
Rules:
---
+ Execution order not set yet.
--- New hook after begin document ---
The hook 'xxx':
Code chunks:
@@ -108,6 +109,7 @@ The hook 'xxx':
---
Rules:
---
+ Execution order not set yet.
The hook 'xxx':
Code chunks:
top-level -> \typeout {some code ...}
@@ -127,3 +129,4 @@ The hook 'xxx':
---
Rules:
---
+ Execution order not set yet.
diff --git a/base/testfiles-lthooks/lthooks-019.tlg b/base/testfiles-lthooks/lthooks-019.tlg
index 004fbc48..4f4c2dea 100644
--- a/base/testfiles-lthooks/lthooks-019.tlg
+++ b/base/testfiles-lthooks/lthooks-019.tlg
@@ -329,6 +329,7 @@ The hook 'Start':
---
Rules:
---
+ Execution order not set yet.
Update code for hook 'Stop' on input line ...:
The hook 'Stop':
Code chunks:
@@ -337,6 +338,7 @@ The hook 'Stop':
---
Rules:
---
+ Execution order not set yet.
**** Add to hook Start (one) on input line ... <- \typeout {begin A}
**** Add to hook Start (one) on input line ... <- \typeout {begin B}
**** Add to hook Start (one) on input line ... <- \typeout {begin C}
diff --git a/base/testfiles-lthooks2/lthooks2-002.tlg b/base/testfiles-lthooks2/lthooks2-002.tlg
index 12187854..f92be6b0 100644
--- a/base/testfiles-lthooks2/lthooks2-002.tlg
+++ b/base/testfiles-lthooks2/lthooks2-002.tlg
@@ -13,6 +13,7 @@ The hook 'begindocument':
---
Rules:
---
+ Execution order not set yet.
Update code for hook 'begindocument' on input line ...:
Update code for hook 'begindocument/before' on input line ...:
Update code for hook 'begindocument/end' on input line ...:
@@ -86,6 +87,7 @@ The hook 'enddocument':
---
Rules:
---
+ Execution order not set yet.
The hook 'enddocument/afterlastpage':
Code chunks:
---
@@ -93,6 +95,7 @@ The hook 'enddocument/afterlastpage':
---
Rules:
---
+ Execution order not set yet.
The hook 'enddocument/afteraux':
Code chunks:
---
@@ -100,6 +103,7 @@ The hook 'enddocument/afteraux':
---
Rules:
---
+ Execution order not set yet.
The hook 'enddocument/info':
Code chunks:
kernel/filelist -> \@dofilelist
diff --git a/base/testfiles-lthooks2/lthooks2-006.tlg b/base/testfiles-lthooks2/lthooks2-006.tlg
index 01690264..3dc62a3f 100644
--- a/base/testfiles-lthooks2/lthooks2-006.tlg
+++ b/base/testfiles-lthooks2/lthooks2-006.tlg
@@ -31,6 +31,7 @@ The hook 'some-hook-a':
---
Rules:
---
+ Execution order not set yet.
-------------------
my-package added CODE:
The hook 'some-hook-b':
@@ -41,6 +42,7 @@ The hook 'some-hook-b':
---
Rules:
---
+ Execution order not set yet.
-------------------
Adding a rule:
The hook 'some-hook-a':
@@ -50,6 +52,7 @@ The hook 'some-hook-a':
---
Rules:
---
+ Execution order not set yet.
-------------------
Now there are no code chunks:
The hook 'some-hook-b':
@@ -60,6 +63,7 @@ The hook 'some-hook-b':
---
Rules:
---
+ Execution order not set yet.
-------------------
No code:
The hook 'some-hook-a':
@@ -69,6 +73,7 @@ The hook 'some-hook-a':
---
Rules:
---
+ Execution order not set yet.
-------------------
Adding a rule:
The hook 'some-hook-a':
@@ -78,6 +83,7 @@ The hook 'some-hook-a':
---
Rules:
---
+ Execution order not set yet.
-------------------
Still no code:
The hook 'some-hook-a':
@@ -87,6 +93,7 @@ The hook 'some-hook-a':
---
Rules:
---
+ Execution order not set yet.
-------------------
No code:
The hook 'some-hook-b':
@@ -97,6 +104,7 @@ The hook 'some-hook-b':
---
Rules:
---
+ Execution order not set yet.
-------------------
Adding a rule:
The hook 'some-hook-a':
@@ -106,6 +114,7 @@ The hook 'some-hook-a':
---
Rules:
---
+ Execution order not set yet.
-------------------
Still no code:
The hook 'some-hook-b':
@@ -116,3 +125,4 @@ The hook 'some-hook-b':
---
Rules:
---
+ Execution order not set yet.
More information about the latex3-commits
mailing list.