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

Will Robertson wspr81 at gmail.com
Wed Jan 16 05:37:39 CET 2019


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

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

commit ed375ec347804e6a4d0597818b716c90fc848d47
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"


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

ed375ec347804e6a4d0597818b716c90fc848d47
 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 88ee336..da7c3f6 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 0399fbb..b0481e2 100644
--- a/l3kernel/l3tl.dtx
+++ b/l3kernel/l3tl.dtx
@@ -663,12 +663,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}
@@ -2380,14 +2381,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