[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: Install latex3/l3kernel 022f11 (a21ae535)
Joseph Wright
joseph.wright at morningstar2.co.uk
Thu Mar 10 15:32:12 CET 2022
Repository : https://github.com/latex3/latex2e
On branch : develop
Link : https://github.com/latex3/latex2e/commit/a21ae5358e2137b40d7d07a6217415c7dca0fefc
>---------------------------------------------------------------
commit a21ae5358e2137b40d7d07a6217415c7dca0fefc
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Tue Mar 8 22:16:09 2022 +0000
Install latex3/l3kernel 022f11
>---------------------------------------------------------------
a21ae5358e2137b40d7d07a6217415c7dca0fefc
texmf/tex/latex/l3kernel/expl3-code.tex | 78 ++++++++++++++++++++++++++++-----
texmf/tex/latex/l3kernel/l3debug.def | 2 +-
2 files changed, 68 insertions(+), 12 deletions(-)
diff --git a/texmf/tex/latex/l3kernel/expl3-code.tex b/texmf/tex/latex/l3kernel/expl3-code.tex
index 3904ec54..62f18c42 100644
--- a/texmf/tex/latex/l3kernel/expl3-code.tex
+++ b/texmf/tex/latex/l3kernel/expl3-code.tex
@@ -13036,6 +13036,8 @@ Type H <return> for immediate help}\def~{\errmessage{%
\bool_new:N \l__keys_tmp_bool
\tl_new:N \l__keys_tmpa_tl
\tl_new:N \l__keys_tmpb_tl
+\bool_new:N \l__keys_precompile_bool
+\tl_new:N \l__keys_precompile_tl
\prop_new:N \l_keys_usage_load_prop
\prop_new:N \l_keys_usage_preamble_prop
\scan_new:N \s__keys_nil
@@ -13043,6 +13045,13 @@ Type H <return> for immediate help}\def~{\errmessage{%
\scan_new:N \s__keys_stop
\quark_new:N \q__keys_no_value
\__kernel_quark_new_conditional:Nn \__keys_quark_if_no_value:N { TF }
+\cs_new_protected:Npn \__keys_precompile:n #1
+ {
+ \bool_if:NTF \l__keys_precompile_bool
+ { \tl_put_right:Nn \l__keys_precompile_tl }
+ { \use:n }
+ {#1}
+ }
\cs_new_protected:Npn \keys_define:nn
{ \__keys_define:onn \l__keys_module_str }
\cs_new_protected:Npn \__keys_define:nnn #1#2#3
@@ -13146,7 +13155,7 @@ Type H <return> for immediate help}\def~{\errmessage{%
{ \exp_not:c { bool_ #2 set_ #3 :N } \exp_not:N #1 }
\__keys_cmd_set:nx { \l_keys_path_str / false }
{ \exp_not:c { bool_ #2 set_ #4 :N } \exp_not:N #1 }
- \__keys_cmd_set:nn { \l_keys_path_str / unknown }
+ \__keys_cmd_set_direct:nn { \l_keys_path_str / unknown }
{
\msg_error:nnx { keys } { boolean-values-only }
\l_keys_key_str
@@ -13178,8 +13187,8 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\cs_set_nopar:cpn { \c__keys_type_root_str \l_keys_path_str }
{ choice }
- \__keys_cmd_set:nn \l_keys_path_str { #1 {##1} }
- \__keys_cmd_set:nn { \l_keys_path_str / unknown }
+ \__keys_cmd_set_direct:nn \l_keys_path_str { #1 {##1} }
+ \__keys_cmd_set_direct:nn { \l_keys_path_str / unknown }
{
\msg_error:nnxx { keys } { choice-unknown }
\l_keys_path_str {##1}
@@ -13207,12 +13216,17 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
}
\cs_new_protected:Npn \__keys_cmd_set:nn #1#2
- { \cs_set_protected:cpn { \c__keys_code_root_str #1 } ##1 {#2} }
+ { \__keys_cmd_set_direct:nn {#1} { \__keys_precompile:n {#2} } }
\cs_generate_variant:Nn \__keys_cmd_set:nn { nx , Vn , Vo }
+\cs_new_protected:Npn \__keys_cmd_set_direct:nn #1#2
+ { \cs_set_protected:cpn { \c__keys_code_root_str #1 } ##1 {#2} }
\cs_new_protected:Npn \__keys_cs_set:NNpn #1#2#3#
{
\cs_set_protected:cpx { \c__keys_code_root_str \l_keys_path_str } ##1
- { #1 \exp_not:N #2 \exp_not:n {#3} {##1} }
+ {
+ \__keys_precompile:n
+ { #1 \exp_not:N #2 \exp_not:n {#3} {##1} }
+ }
\use_none:n
}
\cs_generate_variant:Nn \__keys_cs_set:NNpn { Nc }
@@ -13285,13 +13299,17 @@ Type H <return> for immediate help}\def~{\errmessage{%
}
\cs_new_protected:Npn \__keys_meta_make:n #1
{
- \__keys_cmd_set:Vo \l_keys_path_str
+ \exp_args:NVo \__keys_cmd_set_direct:nn \l_keys_path_str
{
- \exp_after:wN \keys_set:nn \exp_after:wN { \l__keys_module_str } {#1}
+ \exp_after:wN \keys_set:nn \exp_after:wN
+ { \l__keys_module_str } {#1}
}
}
\cs_new_protected:Npn \__keys_meta_make:nn #1#2
- { \__keys_cmd_set:Vn \l_keys_path_str { \keys_set:nn {#1} {#2} } }
+ {
+ \exp_args:NV \__keys_cmd_set_direct:nn
+ \l_keys_path_str { \keys_set:nn {#1} {#2} }
+ }
\cs_new_protected:Npn \__keys_prop_put:Nn #1#2
{
\prop_if_exist:NF #1 { \prop_new:N #1 }
@@ -13748,6 +13766,14 @@ Type H <return> for immediate help}\def~{\errmessage{%
\__keys_set:nn {#2} {#4}
\tl_set:Nn \l__keys_selective_seq {#1}
}
+\cs_new_protected:Npn \keys_precompile:Nnn #1#2#3
+ {
+ \bool_set_true:N \l__keys_precompile_bool
+ \tl_clear:N \l__keys_precompile_tl
+ \keys_set:nn {#2} {#3}
+ \bool_set_false:N \l__keys_precompile_bool
+ \tl_set_eq:NN #1 \l__keys_precompile_tl
+ }
\cs_new_protected:Npn \__keys_set_keyval:n #1
{
\bool_set_true:N \l__keys_no_value_bool
@@ -14088,16 +14114,46 @@ Type H <return> for immediate help}\def~{\errmessage{%
{
\exp_args:Nnf \msg_show_item_unbraced:nn { code }
{
- \exp_args:Nc \cs_replacement_spec:N
+ \exp_args:Ne \__keys_show:n
{
- \c__keys_code_root_str
- \__keys_trim_spaces:n { #2 / #3 }
+ \exp_args:Nc \cs_replacement_spec:N
+ {
+ \c__keys_code_root_str
+ \__keys_trim_spaces:n { #2 / #3 }
+ }
}
}
}
}
{ } { }
}
+\cs_new:Npx \__keys_show:n #1
+ {
+ \exp_not:N \__keys_show:w
+ #1
+ \tl_to_str:n { \__keys_precompile:n }
+ #1
+ \tl_to_str:n { \__keys_precompile:n }
+ \exp_not:N \s__keys_stop
+ }
+\use:x
+ {
+ \cs_new:Npn \exp_not:N \__keys_show:w
+ ##1 \tl_to_str:n { \__keys_precompile:n }
+ ##2 \tl_to_str:n { \__keys_precompile:n }
+ ##3 \exp_not:N \s__keys_stop
+ }
+ {
+ \tl_if_blank:nTF {#2}
+ {#1}
+ { \__keys_show:Nw #2 \s__keys_stop }
+ }
+\use:x
+ {
+ \cs_new:Npn \exp_not:N \__keys_show:Nw ##1##2
+ \c_right_brace_str \exp_not:N \s__keys_stop
+ }
+ {#2}
\msg_new:nnnn { keys } { bad-relative-key-path }
{ The~key~'#1'~is~not~inside~the~'#2'~path. }
{ The~key~'#1'~cannot~be~expressed~relative~to~path~'#2'. }
diff --git a/texmf/tex/latex/l3kernel/l3debug.def b/texmf/tex/latex/l3kernel/l3debug.def
index 7f90a7f9..864ce5a0 100644
--- a/texmf/tex/latex/l3kernel/l3debug.def
+++ b/texmf/tex/latex/l3kernel/l3debug.def
@@ -624,7 +624,7 @@
{ \__kernel_debug_log:x { Defining~key~#1~\msg_line_context: } }
}
{ }
- { \__keys_cmd_set:nn }
+ { \__keys_cmd_set_direct:nn }
\__kernel_patch:nnn
{ }
{
More information about the latex3-commits
mailing list.