[latex3-commits] [git/LaTeX3-latex3-latex2e] gh648: Similar test for \@@_if_file_hook:wTF (d22904ea)
PhelypeOleinik
phelype.oleinik at latex-project.org
Mon Aug 16 06:03:11 CEST 2021
Repository : https://github.com/latex3/latex2e
On branch : gh648
Link : https://github.com/latex3/latex2e/commit/d22904ead12e0d0a6d68e761fdf06a48e9503d1f
>---------------------------------------------------------------
commit d22904ead12e0d0a6d68e761fdf06a48e9503d1f
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date: Mon Aug 16 01:03:11 2021 -0300
Similar test for \@@_if_file_hook:wTF
>---------------------------------------------------------------
d22904ead12e0d0a6d68e761fdf06a48e9503d1f
base/lthooks.dtx | 39 ++++++++++++++++++++++++++++++---------
1 file changed, 30 insertions(+), 9 deletions(-)
diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index f228ca82..2223886b 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -2988,7 +2988,7 @@
\@@_make_usable:n {#5}
}
\exp_args:NNx \prop_if_in:NnT \c_@@_generics_reversed_prop
- { #3 \tl_if_empty:nT {#3} {#2} }
+ { \tl_if_empty:nTF {#3} {#2} {#3} }
{ \tl_gset:cn { g_@@_#5_reversed_tl } { - } }
\prg_return_true:
}
@@ -3074,23 +3074,44 @@
% because \pkg{expl3}'s file name parsing turns all characters into
% catcode-12 tokens, which might differ from hand-input letters.
% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2021/11/15}{\@@_if_file_hook:w}%
+%<latexrelease> {Standardise~generic~hook~names}
\prg_new_conditional:Npnn \@@_if_file_hook:w
#1 / #2 / #3 \s_@@_mark { TF }
{
\str_if_eq:nnTF {#1} { file }
{
- \bool_lazy_or:nnTF
- { \tl_if_empty_p:n {#3} }
- { \str_if_eq_p:nn {#3} { / } }
+ \exp_args:NNx \prop_if_in:NnTF \c_@@_generics_file_prop
+ { \tl_if_empty:nTF {#3} {#2} {#3} }
+ { \prg_return_true: }
{ \prg_return_false: }
- {
- \prop_if_in:NnTF \c_@@_generics_file_prop {#2}
- { \prg_return_true: }
- { \prg_return_false: }
- }
}
{ \prg_return_false: }
}
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2020/10/01}{\@@_if_file_hook:w}%
+%<latexrelease> {Standardise~generic~hook~names}
+%<latexrelease>\prg_new_conditional:Npnn \@@_if_file_hook:w
+%<latexrelease> #1 / #2 / #3 \s_@@_mark { TF }
+%<latexrelease> {
+%<latexrelease> \str_if_eq:nnTF {#1} { file }
+%<latexrelease> {
+%<latexrelease> \bool_lazy_or:nnTF
+%<latexrelease> { \tl_if_empty_p:n {#3} }
+%<latexrelease> { \str_if_eq_p:nn {#3} { / } }
+%<latexrelease> { \prg_return_false: }
+%<latexrelease> {
+%<latexrelease> \prop_if_in:NnTF \c_@@_generics_file_prop {#2}
+%<latexrelease> { \prg_return_true: }
+%<latexrelease> { \prg_return_false: }
+%<latexrelease> }
+%<latexrelease> }
+%<latexrelease> { \prg_return_false: }
+%<latexrelease> }
+%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
% \end{macro}
%
More information about the latex3-commits
mailing list.