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

Will Robertson wspr81 at gmail.com
Mon Jan 14 08:16:54 CET 2019


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

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

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

    some chk variants
    
    (needed in upcoming commits)


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

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

diff --git a/l3kernel/l3basics.dtx b/l3kernel/l3basics.dtx
index c18e497..9bca83e 100644
--- a/l3kernel/l3basics.dtx
+++ b/l3kernel/l3basics.dtx
@@ -1704,7 +1704,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}
@@ -1732,6 +1732,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
@@ -1762,6 +1772,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 { }
@@ -1769,6 +1780,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