[latex3-commits] [git/LaTeX3-latex3-latex3] morechk: new \cs_use:N/c (bfc5233)

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

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

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

    new \cs_use:N/c
    
    with chking, of course


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

bfc5233a94d3ad75f41934651d2614d5b45c4474
 l3kernel/l3basics.dtx |   23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/l3kernel/l3basics.dtx b/l3kernel/l3basics.dtx
index f38b53e..1351b64 100644
--- a/l3kernel/l3basics.dtx
+++ b/l3kernel/l3basics.dtx
@@ -2806,6 +2806,29 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\cs_use:N, \cs_use:c}[EXP,added=2019-01-13]
+%    \begin{macrocode}
+\__kernel_if_debug:TF
+  {
+    \cs_set:Npn \cs_use:N #1
+      {
+        \__kernel_chk_cs_exist:N #1
+        #1
+      }
+    \cs_set:Npn \cs_use:c #1
+      {
+        \__kernel_chk_cs_exist:c {#1}
+        \cs:w #1 \cs_end:
+      }
+  }
+  {
+    \cs_set:Npn \cs_use:N #1 { #1 }
+    \cs_set:Npn \cs_use:c #1 { \cs:w #1 \cs_end: }
+  }
+%    \end{macrocode}
+% \end{macro}
+
+%
 % \subsection{Preliminaries for new functions}
 %
 %    We provide two kinds of functions that can be used to define





More information about the latex3-commits mailing list