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

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/2acdcdb580ebb7f9faacc31adab0737a30fff1e4

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

commit 2acdcdb580ebb7f9faacc31adab0737a30fff1e4
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"


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

2acdcdb580ebb7f9faacc31adab0737a30fff1e4
 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 e880e33..f4d9cd8 100644
--- a/l3kernel/l3str.dtx
+++ b/l3kernel/l3str.dtx
@@ -521,12 +521,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 e8aee01..189cc8a 100644
--- a/l3kernel/l3tl.dtx
+++ b/l3kernel/l3tl.dtx
@@ -661,12 +661,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}
@@ -2408,14 +2409,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