summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-09-15 22:58:44 +0000
committerKarl Berry <karl@freefriends.org>2014-09-15 22:58:44 +0000
commit21b7507fd70dbefe4207e9d0dde58c640208095d (patch)
treef1f3dc5a2397a4addfa5106318633c92748327df /Master/texmf-dist/source/latex/l3kernel/l3token.dtx
parent720ab6d5bd9c366793fd8f03c58aec9b4348bf4d (diff)
l3 (15sep14)
git-svn-id: svn://tug.org/texlive/trunk@35180 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3token.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3token.dtx42
1 files changed, 27 insertions, 15 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
index 416bf573160..cd310c06d3a 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
@@ -37,7 +37,7 @@
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3token.dtx 5354 2014-08-23 01:35:39Z bruno $
+\GetIdInfo$Id: l3token.dtx 5422 2014-09-15 10:44:23Z joseph $
{L3 Experimental token manipulation}
%</driver|package>
%<*driver>
@@ -911,7 +911,7 @@
% \cs_set:Npn \next #1#2 { x #1 y #2 }
% \end{verbatim}
% will leave |#1#2| in the input stream. If the \meta{token} is
-% not a macro then \cs{scan_stop:} will be left in the input stream
+% not a macro then \cs{scan_stop:} will be left in the input stream.
% \begin{texnote}
% If the arg~spec. contains the string |->|, then the |spec| function
% will produce incorrect results.
@@ -930,7 +930,11 @@
% \cs_set:Npn \next #1#2 { x #1~y #2 }
% \end{verbatim}
% will leave \verb|x#1 y#2| in the input stream. If the \meta{token} is
-% not a macro then \cs{scan_stop:} will be left in the input stream
+% not a macro then \cs{scan_stop:} will be left in the input stream.
+% \begin{texnote}
+% If the arg~spec. contains the string |->|, then the |spec| function
+% will produce incorrect results.
+% \end{texnote}
% \end{function}
%
% \begin{function}[EXP]{\token_get_prefix_spec:N}
@@ -1171,23 +1175,31 @@
% \c_catcode_letter_token,
% \c_catcode_other_token
% }
-% We define these useful tokens. We have to do it by hand with the
-% brace tokens for obvious reasons.
+% We define these useful tokens. For the brace and space tokens things have
+% to be done by hand: the formal argument spec.~for \cs{cs_new_eq:NN} does
+% not cover them so we do things by hand. (As currently coded it would
+% \emph{work} with \cs{cs_new_eq:NN} but that's not really a great idea to
+% show off: we want people to stick to the defined interfaces and that
+% includes us.) So that these few odd names go into the log when appropriate
+% there is a need to hand-apply the \cs{__chk_if_free_cs:N} check.
% \begin{macrocode}
-\cs_new_eq:NN \c_group_begin_token {
-\cs_new_eq:NN \c_group_end_token }
\group_begin:
+ \__chk_if_free_cs:N \c_group_begin_token
+ \tex_global:D \tex_let:D \c_group_begin_token {
+ \__chk_if_free_cs:N \c_group_end_token
+ \tex_global:D \tex_let:D \c_group_end_token }
\char_set_catcode_math_toggle:N \*
- \token_new:Nn \c_math_toggle_token { * }
+ \cs_new_eq:NN \c_math_toggle_token *
\char_set_catcode_alignment:N \*
- \token_new:Nn \c_alignment_token { * }
- \token_new:Nn \c_parameter_token { # }
- \token_new:Nn \c_math_superscript_token { ^ }
+ \cs_new_eq:NN \c_alignment_token *
+ \cs_new_eq:NN \c_parameter_token #
+ \cs_new_eq:NN \c_math_superscript_token ^
\char_set_catcode_math_subscript:N \*
- \token_new:Nn \c_math_subscript_token { * }
- \token_new:Nn \c_space_token { ~ }
- \token_new:Nn \c_catcode_letter_token { a }
- \token_new:Nn \c_catcode_other_token { 1 }
+ \cs_new_eq:NN \c_math_subscript_token *
+ \__chk_if_free_cs:N \c_space_token
+ \use:n { \tex_global:D \tex_let:D \c_space_token = ~ } ~
+ \cs_new_eq:NN \c_catcode_letter_token a
+ \cs_new_eq:NN \c_catcode_other_token 1
\group_end:
% \end{macrocode}
% \end{macro}