[latex3-commits] [git/LaTeX3-latex3-latex2e] hook-args: Simplify (836e17bf)
PhelypeOleinik
phelype.oleinik at latex-project.org
Sat Mar 25 03:54:46 CET 2023
Repository : https://github.com/latex3/latex2e
On branch : hook-args
Link : https://github.com/latex3/latex2e/commit/836e17bf2330c859113411adc0e4b232569e5906
>---------------------------------------------------------------
commit 836e17bf2330c859113411adc0e4b232569e5906
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date: Fri Mar 24 23:54:46 2023 -0300
Simplify
>---------------------------------------------------------------
836e17bf2330c859113411adc0e4b232569e5906
base/lthooks.dtx | 36 +++++++++++++++---------------------
1 file changed, 15 insertions(+), 21 deletions(-)
diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index 34340c8a..393467b4 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -4310,29 +4310,19 @@
% \cs[no-index]{@@~\meta{hook}} with the defined number of arguments.
% \begin{macrocode}
\cs_new_protected:Npn \@@_code_gset:nn
- { \@@_code_gset_aux:Nnnn \c_false_bool { } }
-\cs_new_protected:Npn \@@_code_gset_true:nn
- { \@@_code_gset_aux:Nnnn \c_true_bool { } }
+ { \@@_code_gset_aux:nnn { } }
\cs_new_protected:Npn \@@_toplevel_gset:nn
- { \@@_code_gset_aux:Nnnn \c_false_bool { _toplevel } }
+ { \@@_code_gset_aux:nnn { _toplevel } }
\cs_new_protected:Npn \@@_next_gset:nn
- { \@@_code_gset_aux:Nnnn \c_false_bool { _next } }
-\cs_new_protected:Npn \@@_code_gset_aux:Nnnn #1 #2 #3 #4
+ { \@@_code_gset_aux:nnn { _next } }
+\cs_new_protected:Npn \@@_code_gset_aux:nnn #1 #2 #3
{
- \tl_if_exist:cTF { c_@@_#3_parameter_tl }
+ \tl_if_exist:cTF { c_@@_#2_parameter_tl }
{
- \@@_code_gset_auxi:veen
- { c_@@_#3_parameter_tl }
- { }
- {
- \bool_if:NTF #1
- { \exp_not:n }
- { \@@_double_hashes:n }
- {#4}
- }
- { @@#2~#3 }
+ \@@_code_gset_auxi:veen { c_@@_#2_parameter_tl }
+ { } { \@@_double_hashes:n {#3} } { @@#1~#2 }
}
- { \@@_tl_gset:cn { @@#2~#3 } {#4} }
+ { \@@_tl_gset:cn { @@#1~#2 } {#3} }
}
\cs_new_protected:Npn \@@_normalise_cs_args:nn #1 #2
{
@@ -4345,10 +4335,10 @@
{ \@@_braced_cs_parameter:n { @@#1~#2 } }
}
}
- { } { @@#1~#2 }
+ { }
+ { @@#1~#2 }
}
\cs_generate_variant:Nn \@@_code_gset:nn { ne }
-\cs_generate_variant:Nn \@@_code_gset_true:nn { nV }
% \end{macrocode}
% \end{macro}
%
@@ -5109,7 +5099,11 @@
{ \exp_not:c { @@_toplevel~#3 } \@@_braced_real_parameter:n {#3} }
\@@_tl_gput_right:Ne #1
{ \exp_not:c { @@_next~#3 } \@@_braced_real_parameter:n {#3} }
- \@@_code_gset_true:nV {#3} #1
+ \use:e
+ {
+ \cs_gset:cpn { @@~#3 } \use:c { c_@@_#3_parameter_tl }
+ { \exp_not:V #1 }
+ }
}
\cs_new:Npn \@@_braced_actual_parameter:n #1
{
More information about the latex3-commits
mailing list.