[latex3-commits] [git/LaTeX3-latex3-latex3] morechk: some chk variants (c725e7d)

Will Robertson wspr81 at gmail.com
Mon Apr 15 13:44:45 CEST 2019


Repository : https://github.com/latex3/latex3
On branch  : morechk
Link       : https://github.com/latex3/latex3/commit/c725e7deeacc5400850723ad2bc6cc19f6a58c2d

>---------------------------------------------------------------

commit c725e7deeacc5400850723ad2bc6cc19f6a58c2d
Author: Will Robertson <wspr81 at gmail.com>
Date:   Mon Jan 14 12:40:23 2019 +0800

    some chk variants
    
    (needed in upcoming commits)


>---------------------------------------------------------------

c725e7deeacc5400850723ad2bc6cc19f6a58c2d
 l3kernel/l3basics.dtx |   17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/l3kernel/l3basics.dtx b/l3kernel/l3basics.dtx
index 788b00f..f38b53e 100644
--- a/l3kernel/l3basics.dtx
+++ b/l3kernel/l3basics.dtx
@@ -1771,7 +1771,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}
@@ -1799,6 +1799,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
@@ -1829,6 +1839,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 { }
@@ -1836,6 +1847,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