summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3tl.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3tl.dtx31
1 files changed, 27 insertions, 4 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
index 9fa0a297d51..51fcddc242e 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3tl.dtx 3460 2012-02-26 12:16:41Z will $
+\GetIdInfo$Id: l3tl.dtx 3490 2012-03-04 01:00:53Z bruno $
{L3 Experimental token lists}
%</driver|package>
%<*driver>
@@ -154,6 +154,15 @@
% \meta{tl~var2}.
% \end{function}
%
+% \begin{function}[EXP, pTF, added=2012-03-03]{\tl_if_exist:N, \tl_if_exist:c}
+% \begin{syntax}
+% \cs{tl_if_exist_p:N} \meta{tl~var}
+% \cs{tl_if_exist:NTF} \meta{tl~var} \Arg{true code} \Arg{false code}
+% \end{syntax}
+% Tests whether the \meta{tl~var} is currently defined. This does not
+% check that the \meta{tl~var} really is a token list variable.
+% \end{function}
+%
% \section{Adding data to token list variables}
%
% \begin{function}
@@ -1100,9 +1109,9 @@
% Error checking will be sorted out by the parent function.
% \begin{macrocode}
\cs_new_protected:Npn \tl_clear_new:N #1
- { \cs_if_exist:NTF #1 { \tl_clear:N #1 } { \tl_new:N #1 } }
+ { \tl_if_exist:NTF #1 { \tl_clear:N #1 } { \tl_new:N #1 } }
\cs_new_protected:Npn \tl_gclear_new:N #1
- { \cs_if_exist:NTF #1 { \tl_gclear:N #1 } { \tl_new:N #1 } }
+ { \tl_if_exist:NTF #1 { \tl_gclear:N #1 } { \tl_new:N #1 } }
\cs_generate_variant:Nn \tl_clear_new:N { c }
\cs_generate_variant:Nn \tl_gclear_new:N { c }
% \end{macrocode}
@@ -1125,6 +1134,20 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}[pTF]{\tl_if_exist:N, \tl_if_exist:c}
+% Copies of the \texttt{cs} functions defined in \pkg{l3basics}.
+% \begin{macrocode}
+\cs_new_eq:NN \tl_if_exist:NTF \cs_if_exist:NTF
+\cs_new_eq:NN \tl_if_exist:NT \cs_if_exist:NT
+\cs_new_eq:NN \tl_if_exist:NF \cs_if_exist:NF
+\cs_new_eq:NN \tl_if_exist_p:N \cs_if_exist_p:N
+\cs_new_eq:NN \tl_if_exist:cTF \cs_if_exist:cTF
+\cs_new_eq:NN \tl_if_exist:cT \cs_if_exist:cT
+\cs_new_eq:NN \tl_if_exist:cF \cs_if_exist:cF
+\cs_new_eq:NN \tl_if_exist_p:c \cs_if_exist_p:c
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Adding to token list variables}
%
% \begin{macro}
@@ -1787,7 +1810,7 @@
% \begin{macrocode}
\cs_new:Npn \tl_use:N #1
{
- \cs_if_exist:NTF #1 {#1}
+ \tl_if_exist:NTF #1 {#1}
{ \msg_expandable_kernel_error:nnn { kernel } { bad-var } {#1} }
}
\cs_generate_variant:Nn \tl_use:N { c }