diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/expl3.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/expl3.dtx | 76 |
1 files changed, 55 insertions, 21 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx index 179f45d11c8..5003992c6e0 100644 --- a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx @@ -33,8 +33,7 @@ %% %% ----------------------------------------------------------------------- % -%<*driver|package> -\RequirePackage{l3names}[2012/07/15] +%<package>\RequirePackage{l3names}[2012/07/15] %<package>\@ifpackagelater{l3names}{2012/07/15} %<package> {} %<package> {% @@ -47,10 +46,11 @@ %<package> }% %<package> \endinput %<package> } +%<*driver|package> \def\ExplFileName{expl3} \def\ExplFileDescription{L3 Experimental code bundle wrapper} -\def\ExplFileDate{2012/07/16} -\def\ExplFileVersion{3990} +\def\ExplFileDate{2012/08/14} +\def\ExplFileVersion{4091} %</driver|package> %<*driver> \documentclass[full]{l3doc} @@ -1080,37 +1080,71 @@ { \token_to_str:N #1 } } } - \cs_set_protected:Npn \tl_set:Nn #1#2 - { - \__cs_check_exists:N #1 - \cs_set_nopar:Npx #1 { \exp_not:n {#2} } - } - \cs_set_protected:Npn \tl_set:Nx #1#2 +% \end{macrocode} +% No \cs{tl_map_\ldots} yet as the mechanisms are not fully in place. Thus +% instead do a more low level set up for a mapping, as in \pkg{l3basics}. +% \begin{macrocode} + \cs_set_protected:Npn \__cs_tmp:w #1 { - \__cs_check_exists:N #1 - \cs_set_nopar:Npx #1 {#2} + \if_meaning:w ? #1 + \exp_after:wN \use_none_delimit_by_q_recursion_stop:w + \fi: + \use:x + { + \cs_set_protected:Npn #1 \exp_not:n { ##1 ##2 } + { + \__cs_check_exists:N \exp_not:n {##1} + \exp_not:o { #1 {##1} {##2} } + } + } + \__cs_tmp:w } - \cs_set_protected:Npn \tl_gset:Nn #1#2 + \__cs_tmp:w + \tl_set:Nn \tl_set:No \tl_set:Nx + \tl_gset:Nn \tl_gset:No \tl_gset:Nx + \tl_put_left:Nn \tl_put_left:NV + \tl_put_left:No \tl_put_left:Nx + \tl_gput_left:Nn \tl_gput_left:NV + \tl_gput_left:No \tl_gput_left:Nx + \tl_put_right:Nn \tl_put_right:NV + \tl_put_right:No \tl_put_right:Nx + \tl_gput_right:Nn \tl_gput_right:NV + \tl_gput_right:No \tl_gput_right:Nx + ? \q_recursion_stop +% \end{macrocode} +% The two \texttt{set_eq} functions are done by hand as the internals there +% are a bit different. +% \begin{macrocode} + \cs_set_protected:Npn \tl_set_eq:NN #1#2 { \__cs_check_exists:N #1 - \cs_gset_nopar:Npx #1 { \exp_not:n {#2} } + \__cs_check_exists:N #2 + \cs_set_eq:NN #1 #2 } - \cs_set_protected:Npn \tl_gset:Nx #1#2 + \cs_set_protected:Npn \tl_gset_eq:NN #1#2 { \__cs_check_exists:N #1 - \cs_gset_nopar:Npx #1 {#2} + \__cs_check_exists:N #2 + \cs_gset_eq:NN #1 #2 } - \cs_set_protected:Npn \tl_set_eq:NN #1#2 +% \end{macrocode} +% There is also a need to check all three arguments of the +% \texttt{concat} functions: a token list |#2| or |#3| equal to +% \cs{scan_stop:} would lead to problems later on. +% \begin{macrocode} + \cs_set_protected:Npn \tl_concat:NNN #1#2#3 { \__cs_check_exists:N #1 \__cs_check_exists:N #2 - \cs_set_eq:NN #1 #2 + \__cs_check_exists:N #3 + \tl_set:Nx #1 { \exp_not:o {#2} \exp_not:o {#3} } } - \cs_set_protected:Npn \tl_gset_eq:NN #1#2 + \cs_set_protected:Npn \tl_gconcat:NNN #1#2#3 { \__cs_check_exists:N #1 \__cs_check_exists:N #2 - \cs_gset_eq:NN #1 #2 + \__cs_check_exists:N #3 + \tl_gset:Nx #1 { \exp_not:o {#2} \exp_not:o {#3} } } \fi % \end{macrocode} @@ -1355,4 +1389,4 @@ % % \end{implementation} % -% \PrintIndex
\ No newline at end of file +% \PrintIndex |