summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3kernel/l3expan.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-10-10 21:52:54 +0000
committerKarl Berry <karl@freefriends.org>2011-10-10 21:52:54 +0000
commit26a0070af35fa5652128c74fa1f126ec51def209 (patch)
treec3cb194fd4cc2dc13141e39c561dc5bc5d0b7a83 /Master/texmf-dist/tex/latex/l3kernel/l3expan.sty
parent4d055293335b5b39f55edeff0c28700ebc2486eb (diff)
l3kernel 2900 (10oct11)
git-svn-id: svn://tug.org/texlive/trunk@24256 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3expan.sty')
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3expan.sty57
1 files changed, 33 insertions, 24 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3expan.sty b/Master/texmf-dist/tex/latex/l3kernel/l3expan.sty
index 9e513253e40..def2204767c 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/l3expan.sty
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3expan.sty
@@ -46,7 +46,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3expan.dtx 2812 2011-09-12 09:19:26Z bruno $
+\GetIdInfo$Id: l3expan.dtx 2896 2011-10-09 20:36:50Z joseph $
{L3 Experimental argument expansion}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -279,8 +279,8 @@
\cs_new:Npn \exp_last_unbraced:NNNo #1#2#3#4
{ \exp_after:wN #1 \exp_after:wN #2 \exp_after:wN #3 #4 }
\cs_new:Npn \exp_last_two_unbraced:Noo #1#2#3
- { \exp_after:wN \exp_last_two_unbraced_aux:nnN \exp_after:wN {#3} {#2} #1 }
-\cs_new:Npn \exp_last_two_unbraced_aux:nnN #1#2#3
+ { \exp_after:wN \exp_last_two_unbraced_aux:noN \exp_after:wN {#3} {#2} #1 }
+\cs_new:Npn \exp_last_two_unbraced_aux:noN #1#2#3
{ \exp_after:wN #3 #2 #1 }
\cs_new:Npn \exp_not:o #1 { \etex_unexpanded:D \exp_after:wN {#1} }
\cs_new:Npn \exp_not:f #1
@@ -299,6 +299,7 @@
\cs_new_protected:Npn \cs_generate_variant:Nn #1
{
\chk_if_exist_cs:N #1
+ \cs_generate_variant_aux:N #1
\cs_split_function:NN #1 \cs_generate_variant_aux:nnNNn
#1
}
@@ -311,7 +312,23 @@
\fi:
\exp_args:NNc \cs_generate_variant_aux:NNn
#1
- { #2 : #4 \use:c { use_none: \cs_generate_variant_aux:N #4 ? } #3 }
+ {
+ #2 : #4
+ \exp_after:wN \use_i_delimit_by_q_stop:nw
+ \use_none:nnnnnnnnn #4
+ \use_none:nnnnnnnnn
+ \use_none:nnnnnnnn
+ \use_none:nnnnnnn
+ \use_none:nnnnnn
+ \use_none:nnnnn
+ \use_none:nnnn
+ \use_none:nnn
+ \use_none:nn
+ \use_none:n
+ { }
+ \q_stop
+ #3
+ }
{#4}
\cs_generate_variant_aux:Nnnw #1 {#2} {#3}
}
@@ -319,8 +336,7 @@
{
\cs_if_free:NTF #2
{
- \cs_generate_variant_aux:NNpx #1 #2
- { \exp_not:c { exp_args:N #3 } \exp_not:N #1 }
+ \cs_tmp:w #2 { \exp_not:c { exp_args:N #3 } \exp_not:N #1 }
\cs_generate_internal_variant:n {#3}
}
{
@@ -332,14 +348,6 @@
}
}
}
-\cs_new:Npn \cs_generate_variant_aux:N #1
- {
- \if:w ? #1
- \exp_after:wN \use_none:nn
- \fi:
- n
- \cs_generate_variant_aux:N
- }
\group_begin:
\tex_lccode:D `\Z = `\d \scan_stop:
\tex_lccode:D `\? =`\\ \scan_stop:
@@ -353,18 +361,19 @@
\tex_lowercase:D
{
\group_end:
- \cs_new_nopar:Npn \cs_generate_variant_aux:NNpx #1
+ \cs_new_nopar:Npn \cs_generate_variant_aux:N #1
{
\exp_after:wN \cs_generate_variant_aux:w
- \token_to_meaning:N #1 ? PROTECTEZ \q_stop
+ \token_to_meaning:N #1
+ \q_mark \cs_new_protected_nopar:Npx
+ ? PROTECTEZ
+ \q_mark \cs_new_nopar:Npx
+ \q_stop
}
- \cs_new:Npn \cs_generate_variant_aux:w #1 ? PROTECTEZ #2 \q_stop
+ \cs_new:Npn \cs_generate_variant_aux:w
+ #1 ? PROTECTEZ #2 \q_mark #3 #4 \q_stop
{
- \if_catcode:w a \etex_detokenize:D \exp_after:wN {#1} a
- \exp_after:wN \cs_new_protected_nopar:Npx
- \else:
- \exp_after:wN \cs_new_nopar:Npx
- \fi:
+ \cs_set_eq:NN \cs_tmp:w #3
}
}
\cs_new_protected:Npn \cs_generate_internal_variant:n #1
@@ -373,12 +382,12 @@
{
\cs_new:cpx { exp_args:N #1 }
{ \cs_generate_internal_variant_aux:N #1 : }
- }
+ }
}
\cs_new:Npn \cs_generate_internal_variant_aux:N #1
{
\exp_not:c { :: #1 }
- \if_meaning:w #1 :
+ \if_meaning:w : #1
\exp_after:wN \use_none:n
\fi:
\cs_generate_internal_variant_aux:N