[latex3-commits] [git/LaTeX3-latex3-latex3] master: Use \__kernel function rather than an internal boolean (5f6fff8)

Bruno Le Floch bruno at le-floch.fr
Fri Apr 27 16:49:20 CEST 2018


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/5f6fff801cd728841b2161c58a71a5b289fc2b4a

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

commit 5f6fff801cd728841b2161c58a71a5b289fc2b4a
Author: Bruno Le Floch <bruno at le-floch.fr>
Date:   Fri Apr 27 09:40:05 2018 -0400

    Use \__kernel function rather than an internal boolean


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

5f6fff801cd728841b2161c58a71a5b289fc2b4a
 l3kernel/l3flag.dtx |   22 ++++++++++++----------
 l3kernel/l3msg.dtx  |    2 +-
 l3kernel/l3tl.dtx   |   36 +++++++++++++++++++-----------------
 3 files changed, 32 insertions(+), 28 deletions(-)

diff --git a/l3kernel/l3flag.dtx b/l3kernel/l3flag.dtx
index 29a29f2..969ec09 100644
--- a/l3kernel/l3flag.dtx
+++ b/l3kernel/l3flag.dtx
@@ -249,16 +249,18 @@
 %   to be patched since some are defined in terms of others.
 %    \begin{macrocode}
 %<*package>
-\tex_ifodd:D \l at expl@enable at debug@bool
-  \cs_new:Npn \@@_chk_exist:n #1
-    {
-      \flag_if_exist:nF {#1}
-        {
-          \__kernel_msg_expandable_error:nnn
-            { kernel } { bad-variable } { flag~#1~ }
-        }
-    }
-\fi:
+\__kernel_debug:TF
+  {
+    \cs_new:Npn \@@_chk_exist:n #1
+      {
+        \flag_if_exist:nF {#1}
+          {
+            \__kernel_msg_expandable_error:nnn
+              { kernel } { bad-variable } { flag~#1~ }
+          }
+      }
+  }
+  { }
 %</package>
 %    \end{macrocode}
 % \end{macro}
diff --git a/l3kernel/l3msg.dtx b/l3kernel/l3msg.dtx
index c0634e9..55cebb0 100644
--- a/l3kernel/l3msg.dtx
+++ b/l3kernel/l3msg.dtx
@@ -1822,7 +1822,7 @@
 % In format mode the error is somewhat different.
 %    \begin{macrocode}
 %<*package>
-\bool_if:NTF \l at expl@enable at debug@bool
+\__kernel_debug:TF
   {
     \__kernel_msg_new:nnnn { kernel } { debug }
       { The~debugging~option~'#1'~does~not~exist~\msg_line_context:. }
diff --git a/l3kernel/l3tl.dtx b/l3kernel/l3tl.dtx
index 6ff6000..09a369a 100644
--- a/l3kernel/l3tl.dtx
+++ b/l3kernel/l3tl.dtx
@@ -1179,23 +1179,25 @@
 %   For setting token list variables equal to each other.  When checking
 %   is turned on, make sure both variables exist.
 %    \begin{macrocode}
-\tex_ifodd:D \l at expl@enable at debug@bool
-  \cs_new_protected:Npn \tl_set_eq:NN #1#2
-    {
-      \__kernel_chk_var_local:N #1
-      \__kernel_chk_var_exist:N #2
-      \cs_set_eq:NN #1 #2
-    }
-  \cs_new_protected:Npn \tl_gset_eq:NN #1#2
-    {
-      \__kernel_chk_var_global:N #1
-      \__kernel_chk_var_exist:N #2
-      \cs_gset_eq:NN #1 #2
-    }
-\else:
-  \cs_new_eq:NN \tl_set_eq:NN  \cs_set_eq:NN
-  \cs_new_eq:NN \tl_gset_eq:NN \cs_gset_eq:NN
-\fi:
+\__kernel_debug:TF
+  {
+    \cs_new_protected:Npn \tl_set_eq:NN #1#2
+      {
+        \__kernel_chk_var_local:N #1
+        \__kernel_chk_var_exist:N #2
+        \cs_set_eq:NN #1 #2
+      }
+    \cs_new_protected:Npn \tl_gset_eq:NN #1#2
+      {
+        \__kernel_chk_var_global:N #1
+        \__kernel_chk_var_exist:N #2
+        \cs_gset_eq:NN #1 #2
+      }
+  }
+  {
+    \cs_new_eq:NN \tl_set_eq:NN  \cs_set_eq:NN
+    \cs_new_eq:NN \tl_gset_eq:NN \cs_gset_eq:NN
+  }
 \cs_generate_variant:Nn \tl_set_eq:NN { cN, Nc, cc }
 \cs_generate_variant:Nn \tl_gset_eq:NN { cN, Nc, cc }
 %    \end{macrocode}





More information about the latex3-commits mailing list