[latex3-commits] [l3svn] 03/06: Add an internal copy of \char_generate:nn
noreply at latex-project.org
noreply at latex-project.org
Fri Mar 25 22:10:28 CET 2016
This is an automated email from the git hooks/post-receive script.
joseph pushed a commit to branch master
in repository l3svn.
commit 6cacfc347951287215ea6d533df61c9e9e1c41e0
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Fri Mar 25 19:47:54 2016 +0000
Add an internal copy of \char_generate:nn
This will let us make actives with pdfTeX where required and also
to document a version with defined expansion behaviour.
---
l3kernel/l3token.dtx | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/l3kernel/l3token.dtx b/l3kernel/l3token.dtx
index 2632b42..58d6edb 100644
--- a/l3kernel/l3token.dtx
+++ b/l3kernel/l3token.dtx
@@ -1007,6 +1007,19 @@
% not a macro then \cs{scan_stop:} will be left in the input stream
% \end{function}
%
+% \section{Internal functions}
+%
+% \begin{function}[EXP, added = 2016-03-25]{\__char_generate:nn}
+% \begin{syntax}
+% \cs{__char_generate:nn} \Arg{charcode} \Arg{catcode}
+% \end{syntax}
+% This function is identical in operation to the public
+% \cs{char_generate:nn} but omits various sanity tests. In particular, this
+% means it is used in certain places where engine variations need to be
+% accounted for by the kernel. This function expands to a token in exactly
+% two expansion steps.
+% \end{function}
+%
% \end{documentation}
%
% \begin{implementation}
@@ -1270,6 +1283,7 @@
% \end{macro}
%
% \begin{macro}[EXP]{\char_generate:nn}
+% \begin{macro}[EXP, int]{\char_generate:nn}
% \begin{macro}[EXP, aux]{\@@_generate_aux:nn}
% \begin{macro}[EXP, aux]{\@@_generate_aux:nnw}
% \begin{variable}{\l_@@_tmp_tl}
@@ -1287,6 +1301,13 @@
\__int_value:w \__int_eval:w #1 \exp_after:wN ;
\__int_value:w \__int_eval:w #2 ;
}
+\cs_new:Npn \__char_generate:nn #1#2
+ {
+ \exp:w \exp_after:wN
+ \@@_generate_aux:nnw \exp_after:wN
+ { \__int_value:w \__int_eval:w #1 \exp_after:wN }
+ {#2} \exp_end:
+ }
% \end{macrocode}
% Before doing any actual conversion, first some special case filtering.
% The \tn{Ucharcat} primitive cannot make active chars, so that is turned
@@ -1454,6 +1475,7 @@
\group_end:
% \end{macrocode}
% \end{macro}
+% \end{macro}
% \end{variable}
% \end{variable}
% \end{macro}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the latex3-commits
mailing list