[latex3-commits] [git/LaTeX3-latex3-latex3] morechk: tl_use remove check by default (7e1cec7)

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/7e1cec731ba5d3ceb924fc47580adf6c8891674b

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

commit 7e1cec731ba5d3ceb924fc47580adf6c8891674b
Author: Will Robertson <wspr81 at gmail.com>
Date:   Mon Jan 14 15:01:21 2019 +0800

    tl_use remove check by default
    
    re-enabled with "check-declarations"


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

7e1cec731ba5d3ceb924fc47580adf6c8891674b
 l3kernel/l3str.dtx |    7 ++++---
 l3kernel/l3tl.dtx  |   21 ++++++++++++++-------
 2 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/l3kernel/l3str.dtx b/l3kernel/l3str.dtx
index 18f8ba4..6ce421a 100644
--- a/l3kernel/l3str.dtx
+++ b/l3kernel/l3str.dtx
@@ -523,12 +523,13 @@
 %
 % \section{Working with the content of strings}
 %
-% \begin{function}[EXP, added = 2015-09-18]{\str_use:N, \str_use:c}
+% \begin{function}[EXP, added = 2015-09-18, updated = 2019-01-14]{\str_use:N, \str_use:c}
 %   \begin{syntax}
 %     \cs{str_use:N} \meta{str~var}
 %   \end{syntax}
-%   Recovers the content of a \meta{str~var} and places it
-%   directly in the input stream. An error is raised if the variable
+%   Places the content of the \meta{str~var}
+%   directly in the input stream. When the \texttt{check-declarations} option
+%   is in effect an error is raised if the variable
 %   does not exist or if it is invalid. Note that it is possible to use
 %   a \meta{str} directly without an accessor function.
 % \end{function}
diff --git a/l3kernel/l3tl.dtx b/l3kernel/l3tl.dtx
index c9d8c8b..986d3ce 100644
--- a/l3kernel/l3tl.dtx
+++ b/l3kernel/l3tl.dtx
@@ -673,12 +673,13 @@
 %   \cs{tl_to_str:n}.
 % \end{function}
 %
-% \begin{function}[EXP]{\tl_use:N, \tl_use:c}
+% \begin{function}[EXP, updated = 2019-01-14]{\tl_use:N, \tl_use:c}
 %   \begin{syntax}
 %     \cs{tl_use:N} \meta{tl~var}
 %   \end{syntax}
-%   Recovers the content of a \meta{tl~var} and places it
-%   directly in the input stream. An error is raised if the variable
+%   Places the content of the \meta{tl~var}
+%   directly in the input stream. When the \texttt{check-declarations} option
+%   is in effect an error is raised if the variable
 %   does not exist or if it is invalid. Note that it is possible to use
 %   a \meta{tl~var} directly without an accessor function.
 % \end{function}
@@ -2439,14 +2440,20 @@
 % error here. No such luck for ones equal to \cs{scan_stop:} so
 % instead a test is made and if there is an issue an error is forced.
 %    \begin{macrocode}
-\cs_new:Npn \tl_use:N #1
+\__kernel_if_debug:TF
   {
-    \tl_if_exist:NTF #1 {#1}
+    \cs_new:Npn \tl_use:N #1
       {
-        \__kernel_msg_expandable_error:nnn
-          { kernel } { bad-variable } {#1}
+        \tl_if_exist:NTF #1 {#1}
+          {
+            \__kernel_msg_expandable_error:nnn
+              { kernel } { bad-variable } {#1}
+          }
       }
   }
+  {
+    \cs_new:Npn \tl_use:N #1 {#1}
+  }
 \cs_generate_variant:Nn \tl_use:N { c }
 %    \end{macrocode}
 % \end{macro}





More information about the latex3-commits mailing list