summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3basics.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3basics.dtx29
1 files changed, 25 insertions, 4 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
index fe88fa327ee..7bd9da7f78a 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3basics.dtx 2915 2011-10-15 21:21:08Z bruno $
+\GetIdInfo$Id: l3basics.dtx 3023 2011-12-04 07:25:04Z bruno $
{L3 Experimental basic definitions}
%</driver|package>
%<*driver>
@@ -1399,7 +1399,7 @@
% \end{macro}
% \end{macro}
%
-% \subsection {Defining functions}
+% \subsection{Defining functions}
%
% We start by providing functions for the typical definition
% functions. First the local ones.
@@ -1486,12 +1486,12 @@
% \begin{macro}{\use:x}
% \begin{macro}[aux]{\cs_tmp:w}
% Fully expands its argument and passes it to the input stream.
-% Uses |\cs_tmp:| as a scratch register but does not affect it.
+% Uses |\cs_tmp:w| as a scratch register but does not affect it.
% \begin{macrocode}
\cs_set_protected:Npn \use:x #1
{
\group_begin:
- \cs_set:Npx \cs_tmp:w {#1}
+ \cs_set_nopar:Npx \cs_tmp:w {#1}
\exp_after:wN
\group_end:
\cs_tmp:w
@@ -2999,6 +2999,27 @@
% \end{macro}
% \end{macro}
%
+% \subsection{Breaking out of mapping functions}
+%
+% \begin{macro}[EXP]{\prg_break_point:n}
+% \begin{macro}[EXP]{\prg_map_break:}
+% \begin{macro}[EXP]{\prg_map_break:n}
+% In inline mappings, the nesting level must be reset
+% at the end of the mapping, even when the user decides
+% to break out. This is done by putting the code that
+% must be performed as an argument of \cs{prg_break_point:n}.
+% The breaking functions are then defined to jump to
+% that point and perform the argument of \cs{prg_break_point:n},
+% before the user's code (if any).
+% \begin{macrocode}
+\cs_new_eq:NN \prg_break_point:n \use:n
+\cs_new:Npn \prg_map_break: #1 \prg_break_point:n #2 { #2 }
+\cs_new:Npn \prg_map_break:n #1 #2 \prg_break_point:n #3 { #3 #1 }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Deprecated functions}
%
% Deprecated on 2011-05-27, for removal by 2011-08-31.