[latex3-commits] [git/LaTeX3-latex3-latex3] morechk: some chk variants (f92f509)
Will Robertson
wspr81 at gmail.com
Wed Jan 16 05:37:39 CET 2019
Repository : https://github.com/latex3/latex3
On branch : morechk
Link : https://github.com/latex3/latex3/commit/f92f50997f05c9047efeaba6eaa90fc37fef6182
>---------------------------------------------------------------
commit f92f50997f05c9047efeaba6eaa90fc37fef6182
Author: Will Robertson <wspr81 at gmail.com>
Date: Mon Jan 14 12:40:23 2019 +0800
some chk variants
(needed in upcoming commits)
>---------------------------------------------------------------
f92f50997f05c9047efeaba6eaa90fc37fef6182
l3kernel/l3basics.dtx | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/l3kernel/l3basics.dtx b/l3kernel/l3basics.dtx
index c4a273b..4da2087 100644
--- a/l3kernel/l3basics.dtx
+++ b/l3kernel/l3basics.dtx
@@ -1707,7 +1707,7 @@
%
% \begin{macro}
% {\@@_check-declarations_on:, \@@_check-declarations_off:}
-% \begin{macro}{\__kernel_chk_var_exist:N}
+% \begin{macro}{\__kernel_chk_var_exist:N,\__kernel_chk_var_exist:c, \__kernel_chk_var_exist:NT}
% \begin{macro}{\__kernel_chk_cs_exist:N, \__kernel_chk_cs_exist:c}
% \begin{macro}{\__kernel_chk_var_local:N, \__kernel_chk_var_global:N}
% \begin{macro}{\__kernel_chk_var_scope:NN}
@@ -1735,6 +1735,16 @@
{ \token_to_str:N ##1 }
}
}
+ \cs_set_protected:Npn \__kernel_chk_var_exist:NT ##1 ##2
+ {
+ \@@_suspended:T \use_none:nnn
+ \cs_if_exist:NTF ##1
+ { ##2 }
+ {
+ \__kernel_msg_error:nnx { kernel } { non-declared-variable }
+ { \token_to_str:N ##1 }
+ }
+ }
\cs_set_protected:Npn \__kernel_chk_cs_exist:N ##1
{
\@@_suspended:T \use_none:nnn
@@ -1765,6 +1775,7 @@
\exp_args:Nc \cs_set_protected:Npn { @@_check-declarations_off: }
{
\cs_set_protected:Npn \__kernel_chk_var_exist:N ##1 { }
+ \cs_set_protected:Npn \__kernel_chk_var_exist:NT ##1##2 { ##2 }
\cs_set_protected:Npn \__kernel_chk_cs_exist:N ##1 { }
\cs_set_protected:Npn \__kernel_chk_var_local:N ##1 { }
\cs_set_protected:Npn \__kernel_chk_var_global:N ##1 { }
@@ -1772,6 +1783,10 @@
}
\cs_set_protected:Npn \__kernel_chk_cs_exist:c
{ \exp_args:Nc \__kernel_chk_cs_exist:N }
+ \cs_set_protected:Npn \__kernel_chk_var_exist:c
+ { \exp_args:Nc \__kernel_chk_var_exist:N }
+ \cs_set_protected:Npn \__kernel_chk_var_exist:cT
+ { \exp_args:Nc \__kernel_chk_var_exist:NT }
\tex_ifodd:D \l at expl@check at declarations@bool
\use:c { @@_check-declarations_on: }
\else:
More information about the latex3-commits
mailing list