summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3kernel/l3candidates.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3candidates.sty')
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3candidates.sty63
1 files changed, 44 insertions, 19 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3candidates.sty b/Master/texmf-dist/tex/latex/l3kernel/l3candidates.sty
index cee29baf26e..65919abf3ec 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/l3candidates.sty
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3candidates.sty
@@ -47,7 +47,7 @@
%% -----------------------------------------------------------------------
%%
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3candidates.dtx 4298 2012-11-09 13:34:43Z joseph $
+\GetIdInfo$Id: l3candidates.dtx 4383 2012-12-20 15:10:48Z bruno $
{L3 Experimental additions to l3kernel}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -502,20 +502,20 @@
{ 2 } { \exp_after:wN \__clist_use:wwn #1 , {#2} }
}
{
- \exp_after:wN \__clist_use_ii:nwwwwnwn
+ \exp_after:wN \__clist_use:nwwwwnwn
\exp_after:wN { \exp_after:wN } #1 ,
- \q_mark , { \__clist_use_ii:nwwwwnwn {#3} }
- \q_mark , { \__clist_use_iii:nwwn {#4} }
+ \q_mark , { \__clist_use:nwwwwnwn {#3} }
+ \q_mark , { \__clist_use:nwwn {#4} }
\q_stop { }
}
}
{ \__msg_kernel_expandable_error:nnn { kernel } { bad-variable } {#1} }
}
\cs_new:Npn \__clist_use:wwn #1 , #2 , #3 { \exp_not:n { #1 #3 #2 } }
-\cs_new:Npn \__clist_use_ii:nwwwwnwn
+\cs_new:Npn \__clist_use:nwwwwnwn
#1#2 , #3 , #4 , #5 \q_mark , #6#7 \q_stop #8
{ #6 {#3} , {#4} , #5 \q_mark , {#6} #7 \q_stop { #8 #1 #2 } }
-\cs_new:Npn \__clist_use_iii:nwwn #1#2 , #3 \q_stop #4
+\cs_new:Npn \__clist_use:nwwn #1#2 , #3 \q_stop #4
{ \exp_not:n { #4 #1 #2 } }
\fp_new:N \l__coffin_sin_fp
\fp_new:N \l__coffin_cos_fp
@@ -935,10 +935,10 @@
{ 2 } { \exp_after:wN \__seq_use:NnNnn #1 {#2} }
}
{
- \exp_after:wN \__seq_use_ii:nwwwwnwn
+ \exp_after:wN \__seq_use:nwwwwnwn
\exp_after:wN { \exp_after:wN } #1 \__seq_item:n
- \q_mark { \__seq_use_ii:nwwwwnwn {#3} }
- \q_mark { \__seq_use_iii:nwwn {#4} }
+ \q_mark { \__seq_use:nwwwwnwn {#3} }
+ \q_mark { \__seq_use:nwwn {#4} }
\q_stop { }
}
}
@@ -946,14 +946,14 @@
}
\cs_new:Npn \__seq_use:NnNnn \__seq_item:n #1 \__seq_item:n #2#3
{ \exp_not:n { #1 #3 #2 } }
-\cs_new:Npn \__seq_use_ii:nwwwwnwn
+\cs_new:Npn \__seq_use:nwwwwnwn
#1 \__seq_item:n #2 \__seq_item:n #3 \__seq_item:n #4#5
\q_mark #6#7 \q_stop #8
{
#6 \__seq_item:n {#3} \__seq_item:n {#4} #5
\q_mark {#6} #7 \q_stop { #8 #1 #2 }
}
-\cs_new:Npn \__seq_use_iii:nwwn #1 \__seq_item:n #2 #3 \q_stop #4
+\cs_new:Npn \__seq_use:nwwn #1 \__seq_item:n #2 #3 \q_stop #4
{ \exp_not:n { #4 #1 #2 } }
\cs_new:Npn \skip_split_finite_else_action:nnNN #1#2#3#4
{
@@ -1104,16 +1104,41 @@
\char_tmp:NN \char_set_active_eq:NN \cs_set_eq:NN
\char_tmp:NN \char_gset_active_eq:NN \cs_gset_eq:NN
\group_end:
-\cs_new_protected_nopar:Npn \__peek_execute_branches_N_type:
+\group_begin:
+ \char_set_catcode_other:N \O
+ \char_set_catcode_other:N \U
+ \char_set_catcode_other:N \T
+ \char_set_catcode_other:N \E
+ \char_set_catcode_other:N \R
+ \tl_to_lowercase:n
+ {
+ \cs_new_protected_nopar:Npn \__peek_execute_branches_N_type:
+ {
+ \if_int_odd:w
+ \if_catcode:w \exp_not:N \l_peek_token { \c_two \fi:
+ \if_catcode:w \exp_not:N \l_peek_token } \c_two \fi:
+ \if_meaning:w \l_peek_token \c_space_token \c_two \fi:
+ \c_one
+ \exp_after:wN \__peek_N_type:w
+ \token_to_meaning:N \l_peek_token
+ \q_mark \__peek_N_type_aux:nnw
+ OUTER \q_mark \use_none_delimit_by_q_stop:w
+ \q_stop
+ \exp_after:wN \__peek_true:w
+ \else:
+ \exp_after:wN \__peek_false:w
+ \fi:
+ }
+ \cs_new_protected_nopar:Npn \__peek_N_type:w #1 OUTER #2 \q_mark #3
+ { #3 {#1} {#2} }
+ }
+\group_end:
+\cs_new_protected_nopar:Npn \__peek_N_type_aux:nnw #1 #2 #3 \fi:
{
- \bool_if:nTF
- {
- \token_if_eq_catcode_p:NN \l_peek_token \c_group_begin_token ||
- \token_if_eq_catcode_p:NN \l_peek_token \c_group_end_token ||
- \token_if_eq_meaning_p:NN \l_peek_token \c_space_token
- }
- { \__peek_false:w }
+ \fi:
+ \tl_if_in:noTF {#1} { \tl_to_str:n {ma} }
{ \__peek_true:w }
+ { \tl_if_empty:nTF {#2} { \__peek_true:w } { \__peek_false:w } }
}
\cs_new_protected_nopar:Npn \peek_N_type:TF
{ \__peek_token_generic:NNTF \__peek_execute_branches_N_type: \scan_stop: }