[latex3-commits] [l3svn] r6856 - Store argument specification in function definition
noreply at latex-project.org
noreply at latex-project.org
Thu Feb 9 05:01:50 CET 2017
Author: bruno
Date: 2017-02-09 05:01:50 +0100 (Thu, 09 Feb 2017)
New Revision: 6856
Modified:
trunk/l3packages/xparse/testfiles/xparse001.ptex.tlg
trunk/l3packages/xparse/testfiles/xparse001.tlg
trunk/l3packages/xparse/testfiles/xparse001.uptex.tlg
trunk/l3packages/xparse/xparse.dtx
Log:
Store argument specification in function definition
This removes the need for property lists storing the argument
specification of all document commands.
Modified: trunk/l3packages/xparse/testfiles/xparse001.ptex.tlg
===================================================================
--- trunk/l3packages/xparse/testfiles/xparse001.ptex.tlg 2017-02-09 03:07:27 UTC (rev 6855)
+++ trunk/l3packages/xparse/testfiles/xparse001.ptex.tlg 2017-02-09 04:01:50 UTC (rev 6856)
@@ -35,7 +35,7 @@
| You have used \RenewDocumentCommand with a command that was never defined.
| A new command '\foo' will be created.
|...............................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code {}{}{}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {}\foo \foo code {}{}{}.
<recently read> }
l. ...}
> \foo code=\protected\long macro:->First definition.
@@ -50,7 +50,7 @@
.
. Defining command \foo with sig. 'm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {m}\foo \foo code
{\__xparse_grab_m_1:w }{}{}.
<recently read> }
l. ...}
@@ -62,7 +62,7 @@
.
. Redefining command \foo with sig. 'mm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mm}\foo \foo code
{\__xparse_grab_m_2:w }{}{}.
<recently read> }
l. ...}
@@ -74,7 +74,7 @@
.
. Redefining command \foo with sig. 'mmm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmm}\foo \foo code
{\__xparse_grab_m_3:w }{}{}.
<recently read> }
l. ...}
@@ -86,7 +86,7 @@
.
. Redefining command \foo with sig. 'mmmm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmm}\foo \foo code
{\__xparse_grab_m_4:w }{}{}.
<recently read> }
l. ...}
@@ -98,7 +98,7 @@
.
. Redefining command \foo with sig. 'mmmmm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmm}\foo \foo code
{\__xparse_grab_m_5:w }{}{}.
<recently read> }
l. ...}
@@ -110,7 +110,7 @@
.
. Redefining command \foo with sig. 'mmmmmm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmm}\foo \foo code
{\__xparse_grab_m_6:w }{}{}.
<recently read> }
l. ...}
@@ -122,7 +122,7 @@
.
. Redefining command \foo with sig. 'mmmmmmm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmm}\foo \foo code
{\__xparse_grab_m_7:w }{}{}.
<recently read> }
l. ...}
@@ -135,7 +135,7 @@
.
. Redefining command \foo with sig. 'mmmmmmmm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmmm}\foo \foo code
{\__xparse_grab_m_8:w }{}{}.
<recently read> }
l. ...}
@@ -148,7 +148,7 @@
.
. Redefining command \foo with sig. 'mmmmmmmmm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmmmm}\foo \foo code
{\__xparse_grab_m_9:w }{}{}.
<recently read> }
l. ...}
@@ -182,7 +182,7 @@
| LaTeX has been asked to define a function '\foo code' with 10 arguments. TeX
| allows between 0 and 9 arguments for a single function.
|...............................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmmmmm}\foo \foo code
{\__xparse_grab_m_10:w }{}{}.
<recently read> }
l. ...}
@@ -198,7 +198,7 @@
.
. Defining command \foo with sig. '+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {+m}\foo \foo code
{\__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -210,7 +210,7 @@
.
. Redefining command \foo with sig. 'm+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {m+m}\foo \foo code
{\__xparse_grab_m_1:w \__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -222,7 +222,7 @@
.
. Redefining command \foo with sig. 'mm+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mm+m}\foo \foo code
{\__xparse_grab_m_2:w \__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -234,7 +234,7 @@
.
. Redefining command \foo with sig. 'mmm+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmm+m}\foo \foo code
{\__xparse_grab_m_3:w \__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -246,7 +246,7 @@
.
. Redefining command \foo with sig. 'mmmm+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmm+m}\foo \foo code
{\__xparse_grab_m_4:w \__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -258,7 +258,7 @@
.
. Redefining command \foo with sig. 'mmmmm+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmm+m}\foo \foo code
{\__xparse_grab_m_5:w \__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -270,7 +270,7 @@
.
. Redefining command \foo with sig. 'mmmmmm+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmm+m}\foo \foo code
{\__xparse_grab_m_6:w \__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -283,7 +283,7 @@
.
. Redefining command \foo with sig. 'mmmmmmm+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmm+m}\foo \foo code
{\__xparse_grab_m_7:w \__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -296,7 +296,7 @@
.
. Redefining command \foo with sig. 'mmmmmmmm+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmmm+m}\foo \foo code
{\__xparse_grab_m_8:w \__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -313,7 +313,7 @@
.
. Defining command \foo with sig. '>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {>{\foo }m}\foo \foo code
{\__xparse_grab_m:w }{}{{{\foo }}}.
<recently read> }
l. ...}
@@ -325,7 +325,7 @@
.
. Redefining command \foo with sig. 'm>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {m>{\foo }m}\foo \foo code
{\__xparse_grab_m_1:w \__xparse_grab_m:w }{}{{}{{\foo }}}.
<recently read> }
l. ...}
@@ -337,7 +337,7 @@
.
. Redefining command \foo with sig. 'mm>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mm>{\foo }m}\foo \foo code
{\__xparse_grab_m_2:w \__xparse_grab_m:w }{}{{}{}{{\foo }}}.
<recently read> }
l. ...}
@@ -349,7 +349,7 @@
.
. Redefining command \foo with sig. 'mmm>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmm>{\foo }m}\foo \foo code
{\__xparse_grab_m_3:w \__xparse_grab_m:w }{}{{}{}{}{{\foo }}}.
<recently read> }
l. ...}
@@ -361,8 +361,8 @@
.
. Redefining command \foo with sig. 'mmmm>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
-{\__xparse_grab_m_4:w \__xparse_grab_m:w }{}{{}{}{}{}{{\foo }}}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmm>{\foo }m}\foo \foo
+code {\__xparse_grab_m_4:w \__xparse_grab_m:w }{}{{}{}{}{}{{\foo }}}.
<recently read> }
l. ...}
> \foo code=\protected\long macro:#1#2#3#4#5->(#1)(#2)(#3)(#4)(#5).
@@ -373,8 +373,8 @@
.
. Redefining command \foo with sig. 'mmmmm>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
-{\__xparse_grab_m_5:w \__xparse_grab_m:w }{}{{}{}{}{}{}{{\foo }}}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmm>{\foo }m}\foo \foo
+code {\__xparse_grab_m_5:w \__xparse_grab_m:w }{}{{}{}{}{}{}{{\foo }}}.
<recently read> }
l. ...}
> \foo code=\protected\long macro:#1#2#3#4#5#6->(#1)(#2)(#3)(#4)(#5)(#6).
@@ -385,8 +385,8 @@
.
. Redefining command \foo with sig. 'mmmmmm>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
-{\__xparse_grab_m_6:w \__xparse_grab_m:w }{}{{}{}{}{}{}{}{{\foo }}}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmm>{\foo }m}\foo \foo
+code {\__xparse_grab_m_6:w \__xparse_grab_m:w }{}{{}{}{}{}{}{}{{\foo }}}.
<recently read> }
l. ...}
> \foo code=\protected\long
@@ -398,8 +398,8 @@
.
. Redefining command \foo with sig. 'mmmmmmm>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
-{\__xparse_grab_m_7:w \__xparse_grab_m:w }{}{{}{}{}{}{}{}{}{{\foo }}}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmm>{\foo }m}\foo \foo
+code {\__xparse_grab_m_7:w \__xparse_grab_m:w }{}{{}{}{}{}{}{}{}{{\foo }}}.
<recently read> }
l. ...}
> \foo code=\protected\long
@@ -411,8 +411,8 @@
.
. Redefining command \foo with sig. 'mmmmmmmm>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
-{\__xparse_grab_m_8:w \__xparse_grab_m:w }{}{{}{}{}{}{}{}{}{}{{\foo }}}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmmm>{\foo }m}\foo \foo
+code {\__xparse_grab_m_8:w \__xparse_grab_m:w }{}{{}{}{}{}{}{}{}{}{{\foo }}}.
<recently read> }
l. ...}
> \foo code=\protected\long
@@ -444,7 +444,7 @@
.
. Defining command \foo with sig. 'lm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {lm}\foo \foo code
{\__xparse_grab_l:w \__xparse_grab_m_1:w }{}{}.
<recently read> }
l. ...}
@@ -456,7 +456,7 @@
.
. Redefining command \foo with sig. 'mlm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mlm}\foo \foo code
{\__xparse_grab_m_1:w \__xparse_grab_l:w \__xparse_grab_m_1:w }{}{}.
<recently read> }
l. ...}
@@ -468,8 +468,8 @@
.
. Redefining command \foo with sig. 'u{end}u{stop!}' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
-{\__xparse_grab_u:w {end}\__xparse_grab_u:w {stop!}}{}{}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {u{end}u{stop!}}\foo \foo
+code {\__xparse_grab_u:w {end}\__xparse_grab_u:w {stop!}}{}{}.
<recently read> }
l. ...}
> \foo code=\protected\long macro:#1#2->(#1)(#2).
@@ -480,7 +480,7 @@
.
. Redefining command \foo with sig. 'lll' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {lll}\foo \foo code
{\__xparse_grab_l:w \__xparse_grab_l:w \__xparse_grab_l:w }{}{}.
<recently read> }
l. ...}
@@ -492,8 +492,8 @@
.
. Redefining command \foo with sig. '+l>{\foo }u{end}' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
-{\__xparse_grab_l_long:w \__xparse_grab_u:w {end}}{}{{}{{\foo }}}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {+l>{\foo }u{end}}\foo \foo
+code {\__xparse_grab_l_long:w \__xparse_grab_u:w {end}}{}{{}{{\foo }}}.
<recently read> }
l. ...}
> \foo code=\protected\long macro:#1#2->(#1)(#2).
@@ -508,7 +508,7 @@
.
. Defining command \foo with sig. 'som' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {som}\foo \foo code
{\__xparse_grab_t:w *\__xparse_grab_D:w []\__xparse_grab_m_1:w
}{.{.-NoValue-}.}{}.
<recently read> }
@@ -521,7 +521,7 @@
.
. Redefining command \foo with sig. 't+d()+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {t+d()+m}\foo \foo code
{\__xparse_grab_t:w +\__xparse_grab_D:w ()\__xparse_grab_m_long:w
}{.{.-NoValue-}.}{}.
<recently read> }
@@ -534,9 +534,9 @@
.
. Redefining command \foo with sig. '+t\par O{default}mmm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
-{\__xparse_grab_t_long:w \par \__xparse_grab_D:w []\__xparse_grab_m_3:w
-}{.{.default}...}{}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {+t\par O{default}mmm}\foo
+\foo code {\__xparse_grab_t_long:w \par \__xparse_grab_D:w
+[]\__xparse_grab_m_3:w }{.{.default}...}{}.
<recently read> }
l. ...}
> \foo code=\protected\long macro:#1#2#3#4#5->(#1)(#2)(#3)(#4).
@@ -547,7 +547,7 @@
.
. Redefining command \foo with sig. 'momo' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {momo}\foo \foo code
{\__xparse_grab_m_1:w \__xparse_grab_D:w []\__xparse_grab_m_1:w
\__xparse_grab_D_trailing:w []}{.{.-NoValue-}.{.-NoValue-}}{}.
<recently read> }
@@ -560,7 +560,7 @@
.
. Redefining command \foo with sig. 'mgom' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mgom}\foo \foo code
{\__xparse_grab_m_1:w \__xparse_grab_G:w \__xparse_grab_D:w
[]\__xparse_grab_m_1:w }{.{.-NoValue-}{.-NoValue-}.}{}.
<recently read> }
@@ -573,7 +573,7 @@
.
. Redefining command \foo with sig. 'mG{test}sm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mG{test}sm}\foo \foo code
{\__xparse_grab_m_1:w \__xparse_grab_G:w \__xparse_grab_t:w
*\__xparse_grab_m_1:w }{.{.test}..}{}.
<recently read> }
@@ -650,8 +650,8 @@
.
. Defining command \foo with sig. 'm' on line ....
.................................................
-> \foo=macro:->\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN
-\foo code \q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {m}\foo \foo code
+{\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1->(#1).
@@ -662,8 +662,8 @@
.
. Redefining command \foo with sig. '+m' on line ....
.................................................
-> \foo=macro:->\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN
-\foo code \q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {+m}\foo \foo code
+{\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1->(#1).
@@ -674,9 +674,9 @@
.
. Redefining command \foo with sig. 'mmm' on line ....
.................................................
-> \foo=macro:->\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w
-\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN \foo code
-\q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {mmm}\foo \foo code
+{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w
+\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2#3->(#1)(#2)(#3).
@@ -687,9 +687,9 @@
.
. Redefining command \foo with sig. 'om' on line ....
.................................................
-> \foo=macro:->\__xparse_expandable_grab_D:w \foo (arg 1)
-[]{-NoValue-}\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN
-\foo code \q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {om}\foo \foo code
+{\__xparse_expandable_grab_D:w \foo (arg 1)
+[]{-NoValue-}\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2->(#1)(#2).
@@ -700,9 +700,9 @@
.
. Redefining command \foo with sig. '+o+m' on line ....
.................................................
-> \foo=macro:->\__xparse_expandable_grab_D:w \foo (arg 1)
-[]{-NoValue-}\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN
-\foo code \q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {+o+m}\foo \foo code
+{\__xparse_expandable_grab_D:w \foo (arg 1)
+[]{-NoValue-}\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2->(#1)(#2).
@@ -713,9 +713,8 @@
.
. Redefining command \foo with sig. 'sm' on line ....
.................................................
-> \foo=macro:->\__xparse_expandable_grab_t:w \foo (arg 1)
-*\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN \foo code
-\q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {sm}\foo \foo code
+{\__xparse_expandable_grab_t:w \foo (arg 1) *\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2->(#1)(#2).
@@ -726,10 +725,10 @@
.
. Redefining command \foo with sig. 'osm' on line ....
.................................................
-> \foo=macro:->\__xparse_expandable_grab_D:w \foo (arg 1)
+> \foo=macro:->\__xparse_start_expandable:nNNn {osm}\foo \foo code
+{\__xparse_expandable_grab_D:w \foo (arg 1)
[]{-NoValue-}\__xparse_expandable_grab_t:w \foo (arg 2)
-*\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN \foo code
-\q__xparse \foo .
+*\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2#3->(#1)(#2)(#3).
@@ -761,9 +760,9 @@
| Expandable commands must have a final mandatory argument (or no arguments at
| all). You cannot have a terminal optional argument with expandable commands.
|...............................................
-> \foo=macro:->\__xparse_expandable_grab_m:w \__xparse_expandable_grab_D:w
-\foo (arg 2) []{-NoValue-}\__xparse_grab_expandable_end:wN \foo code
-\q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {mo}\foo \foo code
+{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_D:w \foo (arg 2)
+[]{-NoValue-}}.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2->(#1).
@@ -808,9 +807,9 @@
| The arguments for an expandable command must either all be short or all be
| long. You have tried to mix the two types.
|...............................................
-> \foo=macro:->\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w
-\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN \foo code
-\q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {+mmm}\foo \foo code
+{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w
+\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2#3->(#1)(#2)(#3).
@@ -838,9 +837,9 @@
| The arguments for an expandable command must either all be short or all be
| long. You have tried to mix the two types.
|...............................................
-> \foo=macro:->\__xparse_expandable_grab_D:w \foo (arg 1)
-[]{-NoValue-}\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN
-\foo code \q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {o+m}\foo \foo code
+{\__xparse_expandable_grab_D:w \foo (arg 1)
+[]{-NoValue-}\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2->(#1)(#2).
@@ -868,9 +867,9 @@
| Expandable commands must have a final mandatory argument (or no arguments at
| all). You cannot have a terminal optional argument with expandable commands.
|...............................................
-> \foo=macro:->\__xparse_expandable_grab_R:w \foo (arg 1)
-(){-NoValue-}\__xparse_expandable_grab_D:w \foo (arg 2)
-[]{-NoValue-}\__xparse_grab_expandable_end:wN \foo code \q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {r()o}\foo \foo code
+{\__xparse_expandable_grab_R:w \foo (arg 1)
+(){-NoValue-}\__xparse_expandable_grab_D:w \foo (arg 2) []{-NoValue-}}.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2->(#1)(#2).
@@ -912,7 +911,7 @@
| defined.
| A new environment 'foo' will be created.
|...............................................
-> \environment foo=\protected macro:->\__xparse_start_cmd:NNnnn \environment
+> \environment foo=\protected macro:->\__xparse_start:nNNnnn {}\environment
foo \environment foo code {}{}{}.
<recently read> }
l. ...}
@@ -929,7 +928,7 @@
.
. Defining environment 'foo' with sig. 'mmm' on line ....
.................................................
-> \environment foo=\protected macro:->\__xparse_start_cmd:NNnnn \environment
+> \environment foo=\protected macro:->\__xparse_start:nNNnnn {mmm}\environment
foo \environment foo code {\__xparse_grab_m_3:w }{}{}.
<recently read> }
l. ...}
@@ -943,7 +942,7 @@
.
. Redefining environment 'foo' with sig. 'som' on line ....
.................................................
-> \environment foo=\protected macro:->\__xparse_start_cmd:NNnnn \environment
+> \environment foo=\protected macro:->\__xparse_start:nNNnnn {som}\environment
foo \environment foo code {\__xparse_grab_t:w *\__xparse_grab_D:w
[]\__xparse_grab_m_1:w }{.{.-NoValue-}.}{}.
<recently read> }
@@ -958,9 +957,9 @@
.
. Redefining environment 'foo' with sig. 'so+m' on line ....
.................................................
-> \environment foo=\protected macro:->\__xparse_start_cmd:NNnnn \environment
-foo \environment foo code {\__xparse_grab_t:w *\__xparse_grab_D:w
-[]\__xparse_grab_m_long:w }{.{.-NoValue-}.}{}.
+> \environment foo=\protected macro:->\__xparse_start:nNNnnn
+{so+m}\environment foo \environment foo code {\__xparse_grab_t:w
+*\__xparse_grab_D:w []\__xparse_grab_m_long:w }{.{.-NoValue-}.}{}.
<recently read> }
l. ...}
> \environment foo code=\protected\long macro:#1#2#3->\cs_set_nopar:Npx
@@ -973,9 +972,9 @@
.
. Redefining environment 'foo' with sig. 'u{stop}om' on line ....
.................................................
-> \environment foo=\protected macro:->\__xparse_start_cmd:NNnnn \environment
-foo \environment foo code {\__xparse_grab_u:w {stop}\__xparse_grab_D:w
-[]\__xparse_grab_m_1:w }{.{.-NoValue-}.}{}.
+> \environment foo=\protected macro:->\__xparse_start:nNNnnn
+{u{stop}om}\environment foo \environment foo code {\__xparse_grab_u:w
+{stop}\__xparse_grab_D:w []\__xparse_grab_m_1:w }{.{.-NoValue-}.}{}.
<recently read> }
l. ...}
> \environment foo code=\protected\long macro:#1#2#3->\cs_set_nopar:Npx
@@ -988,7 +987,7 @@
.
. Redefining environment 'foo' with sig. 'moo' on line ....
.................................................
-> \environment foo=\protected macro:->\__xparse_start_cmd:NNnnn \environment
+> \environment foo=\protected macro:->\__xparse_start:nNNnnn {moo}\environment
foo \environment foo code {\__xparse_grab_m_1:w \__xparse_grab_D_trailing:w
[]\__xparse_grab_D_trailing:w []}{.{.-NoValue-}{.-NoValue-}}{}.
<recently read> }
Modified: trunk/l3packages/xparse/testfiles/xparse001.tlg
===================================================================
--- trunk/l3packages/xparse/testfiles/xparse001.tlg 2017-02-09 03:07:27 UTC (rev 6855)
+++ trunk/l3packages/xparse/testfiles/xparse001.tlg 2017-02-09 04:01:50 UTC (rev 6856)
@@ -35,7 +35,7 @@
| You have used \RenewDocumentCommand with a command that was never defined.
| A new command '\foo' will be created.
|...............................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code {}{}{}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {}\foo \foo code {}{}{}.
<recently read> }
l. ...}
> \foo code=\protected\long macro:->First definition.
@@ -50,7 +50,7 @@
.
. Defining command \foo with sig. 'm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {m}\foo \foo code
{\__xparse_grab_m_1:w }{}{}.
<recently read> }
l. ...}
@@ -62,7 +62,7 @@
.
. Redefining command \foo with sig. 'mm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mm}\foo \foo code
{\__xparse_grab_m_2:w }{}{}.
<recently read> }
l. ...}
@@ -74,7 +74,7 @@
.
. Redefining command \foo with sig. 'mmm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmm}\foo \foo code
{\__xparse_grab_m_3:w }{}{}.
<recently read> }
l. ...}
@@ -86,7 +86,7 @@
.
. Redefining command \foo with sig. 'mmmm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmm}\foo \foo code
{\__xparse_grab_m_4:w }{}{}.
<recently read> }
l. ...}
@@ -98,7 +98,7 @@
.
. Redefining command \foo with sig. 'mmmmm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmm}\foo \foo code
{\__xparse_grab_m_5:w }{}{}.
<recently read> }
l. ...}
@@ -110,7 +110,7 @@
.
. Redefining command \foo with sig. 'mmmmmm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmm}\foo \foo code
{\__xparse_grab_m_6:w }{}{}.
<recently read> }
l. ...}
@@ -122,7 +122,7 @@
.
. Redefining command \foo with sig. 'mmmmmmm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmm}\foo \foo code
{\__xparse_grab_m_7:w }{}{}.
<recently read> }
l. ...}
@@ -135,7 +135,7 @@
.
. Redefining command \foo with sig. 'mmmmmmmm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmmm}\foo \foo code
{\__xparse_grab_m_8:w }{}{}.
<recently read> }
l. ...}
@@ -148,7 +148,7 @@
.
. Redefining command \foo with sig. 'mmmmmmmmm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmmmm}\foo \foo code
{\__xparse_grab_m_9:w }{}{}.
<recently read> }
l. ...}
@@ -182,7 +182,7 @@
| LaTeX has been asked to define a function '\foo code' with 10 arguments. TeX
| allows between 0 and 9 arguments for a single function.
|...............................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmmmmm}\foo \foo code
{\__xparse_grab_m_10:w }{}{}.
<recently read> }
l. ...}
@@ -198,7 +198,7 @@
.
. Defining command \foo with sig. '+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {+m}\foo \foo code
{\__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -210,7 +210,7 @@
.
. Redefining command \foo with sig. 'm+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {m+m}\foo \foo code
{\__xparse_grab_m_1:w \__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -222,7 +222,7 @@
.
. Redefining command \foo with sig. 'mm+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mm+m}\foo \foo code
{\__xparse_grab_m_2:w \__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -234,7 +234,7 @@
.
. Redefining command \foo with sig. 'mmm+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmm+m}\foo \foo code
{\__xparse_grab_m_3:w \__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -246,7 +246,7 @@
.
. Redefining command \foo with sig. 'mmmm+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmm+m}\foo \foo code
{\__xparse_grab_m_4:w \__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -258,7 +258,7 @@
.
. Redefining command \foo with sig. 'mmmmm+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmm+m}\foo \foo code
{\__xparse_grab_m_5:w \__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -270,7 +270,7 @@
.
. Redefining command \foo with sig. 'mmmmmm+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmm+m}\foo \foo code
{\__xparse_grab_m_6:w \__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -283,7 +283,7 @@
.
. Redefining command \foo with sig. 'mmmmmmm+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmm+m}\foo \foo code
{\__xparse_grab_m_7:w \__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -296,7 +296,7 @@
.
. Redefining command \foo with sig. 'mmmmmmmm+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmmm+m}\foo \foo code
{\__xparse_grab_m_8:w \__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -313,7 +313,7 @@
.
. Defining command \foo with sig. '>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {>{\foo }m}\foo \foo code
{\__xparse_grab_m:w }{}{{{\foo }}}.
<recently read> }
l. ...}
@@ -325,7 +325,7 @@
.
. Redefining command \foo with sig. 'm>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {m>{\foo }m}\foo \foo code
{\__xparse_grab_m_1:w \__xparse_grab_m:w }{}{{}{{\foo }}}.
<recently read> }
l. ...}
@@ -337,7 +337,7 @@
.
. Redefining command \foo with sig. 'mm>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mm>{\foo }m}\foo \foo code
{\__xparse_grab_m_2:w \__xparse_grab_m:w }{}{{}{}{{\foo }}}.
<recently read> }
l. ...}
@@ -349,7 +349,7 @@
.
. Redefining command \foo with sig. 'mmm>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmm>{\foo }m}\foo \foo code
{\__xparse_grab_m_3:w \__xparse_grab_m:w }{}{{}{}{}{{\foo }}}.
<recently read> }
l. ...}
@@ -361,8 +361,8 @@
.
. Redefining command \foo with sig. 'mmmm>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
-{\__xparse_grab_m_4:w \__xparse_grab_m:w }{}{{}{}{}{}{{\foo }}}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmm>{\foo }m}\foo \foo
+code {\__xparse_grab_m_4:w \__xparse_grab_m:w }{}{{}{}{}{}{{\foo }}}.
<recently read> }
l. ...}
> \foo code=\protected\long macro:#1#2#3#4#5->(#1)(#2)(#3)(#4)(#5).
@@ -373,8 +373,8 @@
.
. Redefining command \foo with sig. 'mmmmm>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
-{\__xparse_grab_m_5:w \__xparse_grab_m:w }{}{{}{}{}{}{}{{\foo }}}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmm>{\foo }m}\foo \foo
+code {\__xparse_grab_m_5:w \__xparse_grab_m:w }{}{{}{}{}{}{}{{\foo }}}.
<recently read> }
l. ...}
> \foo code=\protected\long macro:#1#2#3#4#5#6->(#1)(#2)(#3)(#4)(#5)(#6).
@@ -385,8 +385,8 @@
.
. Redefining command \foo with sig. 'mmmmmm>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
-{\__xparse_grab_m_6:w \__xparse_grab_m:w }{}{{}{}{}{}{}{}{{\foo }}}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmm>{\foo }m}\foo \foo
+code {\__xparse_grab_m_6:w \__xparse_grab_m:w }{}{{}{}{}{}{}{}{{\foo }}}.
<recently read> }
l. ...}
> \foo code=\protected\long
@@ -398,8 +398,8 @@
.
. Redefining command \foo with sig. 'mmmmmmm>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
-{\__xparse_grab_m_7:w \__xparse_grab_m:w }{}{{}{}{}{}{}{}{}{{\foo }}}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmm>{\foo }m}\foo \foo
+code {\__xparse_grab_m_7:w \__xparse_grab_m:w }{}{{}{}{}{}{}{}{}{{\foo }}}.
<recently read> }
l. ...}
> \foo code=\protected\long
@@ -411,8 +411,8 @@
.
. Redefining command \foo with sig. 'mmmmmmmm>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
-{\__xparse_grab_m_8:w \__xparse_grab_m:w }{}{{}{}{}{}{}{}{}{}{{\foo }}}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmmm>{\foo }m}\foo \foo
+code {\__xparse_grab_m_8:w \__xparse_grab_m:w }{}{{}{}{}{}{}{}{}{}{{\foo }}}.
<recently read> }
l. ...}
> \foo code=\protected\long
@@ -444,7 +444,7 @@
.
. Defining command \foo with sig. 'lm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {lm}\foo \foo code
{\__xparse_grab_l:w \__xparse_grab_m_1:w }{}{}.
<recently read> }
l. ...}
@@ -456,7 +456,7 @@
.
. Redefining command \foo with sig. 'mlm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mlm}\foo \foo code
{\__xparse_grab_m_1:w \__xparse_grab_l:w \__xparse_grab_m_1:w }{}{}.
<recently read> }
l. ...}
@@ -468,8 +468,8 @@
.
. Redefining command \foo with sig. 'u{end}u{stop!}' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
-{\__xparse_grab_u:w {end}\__xparse_grab_u:w {stop!}}{}{}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {u{end}u{stop!}}\foo \foo
+code {\__xparse_grab_u:w {end}\__xparse_grab_u:w {stop!}}{}{}.
<recently read> }
l. ...}
> \foo code=\protected\long macro:#1#2->(#1)(#2).
@@ -480,7 +480,7 @@
.
. Redefining command \foo with sig. 'lll' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {lll}\foo \foo code
{\__xparse_grab_l:w \__xparse_grab_l:w \__xparse_grab_l:w }{}{}.
<recently read> }
l. ...}
@@ -492,8 +492,8 @@
.
. Redefining command \foo with sig. '+l>{\foo }u{end}' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
-{\__xparse_grab_l_long:w \__xparse_grab_u:w {end}}{}{{}{{\foo }}}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {+l>{\foo }u{end}}\foo \foo
+code {\__xparse_grab_l_long:w \__xparse_grab_u:w {end}}{}{{}{{\foo }}}.
<recently read> }
l. ...}
> \foo code=\protected\long macro:#1#2->(#1)(#2).
@@ -508,7 +508,7 @@
.
. Defining command \foo with sig. 'som' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {som}\foo \foo code
{\__xparse_grab_t:w *\__xparse_grab_D:w []\__xparse_grab_m_1:w
}{.{.-NoValue-}.}{}.
<recently read> }
@@ -521,7 +521,7 @@
.
. Redefining command \foo with sig. 't+d()+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {t+d()+m}\foo \foo code
{\__xparse_grab_t:w +\__xparse_grab_D:w ()\__xparse_grab_m_long:w
}{.{.-NoValue-}.}{}.
<recently read> }
@@ -534,9 +534,9 @@
.
. Redefining command \foo with sig. '+t\par O{default}mmm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
-{\__xparse_grab_t_long:w \par \__xparse_grab_D:w []\__xparse_grab_m_3:w
-}{.{.default}...}{}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {+t\par O{default}mmm}\foo
+\foo code {\__xparse_grab_t_long:w \par \__xparse_grab_D:w
+[]\__xparse_grab_m_3:w }{.{.default}...}{}.
<recently read> }
l. ...}
> \foo code=\protected\long macro:#1#2#3#4#5->(#1)(#2)(#3)(#4).
@@ -547,7 +547,7 @@
.
. Redefining command \foo with sig. 'momo' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {momo}\foo \foo code
{\__xparse_grab_m_1:w \__xparse_grab_D:w []\__xparse_grab_m_1:w
\__xparse_grab_D_trailing:w []}{.{.-NoValue-}.{.-NoValue-}}{}.
<recently read> }
@@ -560,7 +560,7 @@
.
. Redefining command \foo with sig. 'mgom' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mgom}\foo \foo code
{\__xparse_grab_m_1:w \__xparse_grab_G:w \__xparse_grab_D:w
[]\__xparse_grab_m_1:w }{.{.-NoValue-}{.-NoValue-}.}{}.
<recently read> }
@@ -573,7 +573,7 @@
.
. Redefining command \foo with sig. 'mG{test}sm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mG{test}sm}\foo \foo code
{\__xparse_grab_m_1:w \__xparse_grab_G:w \__xparse_grab_t:w
*\__xparse_grab_m_1:w }{.{.test}..}{}.
<recently read> }
@@ -650,8 +650,8 @@
.
. Defining command \foo with sig. 'm' on line ....
.................................................
-> \foo=macro:->\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN
-\foo code \q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {m}\foo \foo code
+{\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1->(#1).
@@ -662,8 +662,8 @@
.
. Redefining command \foo with sig. '+m' on line ....
.................................................
-> \foo=macro:->\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN
-\foo code \q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {+m}\foo \foo code
+{\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1->(#1).
@@ -674,9 +674,9 @@
.
. Redefining command \foo with sig. 'mmm' on line ....
.................................................
-> \foo=macro:->\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w
-\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN \foo code
-\q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {mmm}\foo \foo code
+{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w
+\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2#3->(#1)(#2)(#3).
@@ -687,9 +687,9 @@
.
. Redefining command \foo with sig. 'om' on line ....
.................................................
-> \foo=macro:->\__xparse_expandable_grab_D:w \foo (arg 1)
-[]{-NoValue-}\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN
-\foo code \q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {om}\foo \foo code
+{\__xparse_expandable_grab_D:w \foo (arg 1)
+[]{-NoValue-}\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2->(#1)(#2).
@@ -700,9 +700,9 @@
.
. Redefining command \foo with sig. '+o+m' on line ....
.................................................
-> \foo=macro:->\__xparse_expandable_grab_D:w \foo (arg 1)
-[]{-NoValue-}\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN
-\foo code \q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {+o+m}\foo \foo code
+{\__xparse_expandable_grab_D:w \foo (arg 1)
+[]{-NoValue-}\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2->(#1)(#2).
@@ -713,9 +713,8 @@
.
. Redefining command \foo with sig. 'sm' on line ....
.................................................
-> \foo=macro:->\__xparse_expandable_grab_t:w \foo (arg 1)
-*\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN \foo code
-\q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {sm}\foo \foo code
+{\__xparse_expandable_grab_t:w \foo (arg 1) *\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2->(#1)(#2).
@@ -726,10 +725,10 @@
.
. Redefining command \foo with sig. 'osm' on line ....
.................................................
-> \foo=macro:->\__xparse_expandable_grab_D:w \foo (arg 1)
+> \foo=macro:->\__xparse_start_expandable:nNNn {osm}\foo \foo code
+{\__xparse_expandable_grab_D:w \foo (arg 1)
[]{-NoValue-}\__xparse_expandable_grab_t:w \foo (arg 2)
-*\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN \foo code
-\q__xparse \foo .
+*\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2#3->(#1)(#2)(#3).
@@ -761,9 +760,9 @@
| Expandable commands must have a final mandatory argument (or no arguments at
| all). You cannot have a terminal optional argument with expandable commands.
|...............................................
-> \foo=macro:->\__xparse_expandable_grab_m:w \__xparse_expandable_grab_D:w
-\foo (arg 2) []{-NoValue-}\__xparse_grab_expandable_end:wN \foo code
-\q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {mo}\foo \foo code
+{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_D:w \foo (arg 2)
+[]{-NoValue-}}.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2->(#1).
@@ -808,9 +807,9 @@
| The arguments for an expandable command must either all be short or all be
| long. You have tried to mix the two types.
|...............................................
-> \foo=macro:->\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w
-\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN \foo code
-\q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {+mmm}\foo \foo code
+{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w
+\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2#3->(#1)(#2)(#3).
@@ -838,9 +837,9 @@
| The arguments for an expandable command must either all be short or all be
| long. You have tried to mix the two types.
|...............................................
-> \foo=macro:->\__xparse_expandable_grab_D:w \foo (arg 1)
-[]{-NoValue-}\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN
-\foo code \q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {o+m}\foo \foo code
+{\__xparse_expandable_grab_D:w \foo (arg 1)
+[]{-NoValue-}\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2->(#1)(#2).
@@ -868,9 +867,9 @@
| Expandable commands must have a final mandatory argument (or no arguments at
| all). You cannot have a terminal optional argument with expandable commands.
|...............................................
-> \foo=macro:->\__xparse_expandable_grab_R:w \foo (arg 1)
-(){-NoValue-}\__xparse_expandable_grab_D:w \foo (arg 2)
-[]{-NoValue-}\__xparse_grab_expandable_end:wN \foo code \q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {r()o}\foo \foo code
+{\__xparse_expandable_grab_R:w \foo (arg 1)
+(){-NoValue-}\__xparse_expandable_grab_D:w \foo (arg 2) []{-NoValue-}}.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2->(#1)(#2).
@@ -912,7 +911,7 @@
| defined.
| A new environment 'foo' will be created.
|...............................................
-> \environment foo=\protected macro:->\__xparse_start_cmd:NNnnn \environment
+> \environment foo=\protected macro:->\__xparse_start:nNNnnn {}\environment
foo \environment foo code {}{}{}.
<recently read> }
l. ...}
@@ -929,7 +928,7 @@
.
. Defining environment 'foo' with sig. 'mmm' on line ....
.................................................
-> \environment foo=\protected macro:->\__xparse_start_cmd:NNnnn \environment
+> \environment foo=\protected macro:->\__xparse_start:nNNnnn {mmm}\environment
foo \environment foo code {\__xparse_grab_m_3:w }{}{}.
<recently read> }
l. ...}
@@ -943,7 +942,7 @@
.
. Redefining environment 'foo' with sig. 'som' on line ....
.................................................
-> \environment foo=\protected macro:->\__xparse_start_cmd:NNnnn \environment
+> \environment foo=\protected macro:->\__xparse_start:nNNnnn {som}\environment
foo \environment foo code {\__xparse_grab_t:w *\__xparse_grab_D:w
[]\__xparse_grab_m_1:w }{.{.-NoValue-}.}{}.
<recently read> }
@@ -958,9 +957,9 @@
.
. Redefining environment 'foo' with sig. 'so+m' on line ....
.................................................
-> \environment foo=\protected macro:->\__xparse_start_cmd:NNnnn \environment
-foo \environment foo code {\__xparse_grab_t:w *\__xparse_grab_D:w
-[]\__xparse_grab_m_long:w }{.{.-NoValue-}.}{}.
+> \environment foo=\protected macro:->\__xparse_start:nNNnnn
+{so+m}\environment foo \environment foo code {\__xparse_grab_t:w
+*\__xparse_grab_D:w []\__xparse_grab_m_long:w }{.{.-NoValue-}.}{}.
<recently read> }
l. ...}
> \environment foo code=\protected\long macro:#1#2#3->\cs_set_nopar:Npx
@@ -973,9 +972,9 @@
.
. Redefining environment 'foo' with sig. 'u{stop}om' on line ....
.................................................
-> \environment foo=\protected macro:->\__xparse_start_cmd:NNnnn \environment
-foo \environment foo code {\__xparse_grab_u:w {stop}\__xparse_grab_D:w
-[]\__xparse_grab_m_1:w }{.{.-NoValue-}.}{}.
+> \environment foo=\protected macro:->\__xparse_start:nNNnnn
+{u{stop}om}\environment foo \environment foo code {\__xparse_grab_u:w
+{stop}\__xparse_grab_D:w []\__xparse_grab_m_1:w }{.{.-NoValue-}.}{}.
<recently read> }
l. ...}
> \environment foo code=\protected\long macro:#1#2#3->\cs_set_nopar:Npx
@@ -988,7 +987,7 @@
.
. Redefining environment 'foo' with sig. 'moo' on line ....
.................................................
-> \environment foo=\protected macro:->\__xparse_start_cmd:NNnnn \environment
+> \environment foo=\protected macro:->\__xparse_start:nNNnnn {moo}\environment
foo \environment foo code {\__xparse_grab_m_1:w \__xparse_grab_D_trailing:w
[]\__xparse_grab_D_trailing:w []}{.{.-NoValue-}{.-NoValue-}}{}.
<recently read> }
Modified: trunk/l3packages/xparse/testfiles/xparse001.uptex.tlg
===================================================================
--- trunk/l3packages/xparse/testfiles/xparse001.uptex.tlg 2017-02-09 03:07:27 UTC (rev 6855)
+++ trunk/l3packages/xparse/testfiles/xparse001.uptex.tlg 2017-02-09 04:01:50 UTC (rev 6856)
@@ -35,7 +35,7 @@
| You have used \RenewDocumentCommand with a command that was never defined.
| A new command '\foo' will be created.
|...............................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code {}{}{}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {}\foo \foo code {}{}{}.
<recently read> }
l. ...}
> \foo code=\protected\long macro:->First definition.
@@ -50,7 +50,7 @@
.
. Defining command \foo with sig. 'm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {m}\foo \foo code
{\__xparse_grab_m_1:w }{}{}.
<recently read> }
l. ...}
@@ -62,7 +62,7 @@
.
. Redefining command \foo with sig. 'mm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mm}\foo \foo code
{\__xparse_grab_m_2:w }{}{}.
<recently read> }
l. ...}
@@ -74,7 +74,7 @@
.
. Redefining command \foo with sig. 'mmm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmm}\foo \foo code
{\__xparse_grab_m_3:w }{}{}.
<recently read> }
l. ...}
@@ -86,7 +86,7 @@
.
. Redefining command \foo with sig. 'mmmm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmm}\foo \foo code
{\__xparse_grab_m_4:w }{}{}.
<recently read> }
l. ...}
@@ -98,7 +98,7 @@
.
. Redefining command \foo with sig. 'mmmmm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmm}\foo \foo code
{\__xparse_grab_m_5:w }{}{}.
<recently read> }
l. ...}
@@ -110,7 +110,7 @@
.
. Redefining command \foo with sig. 'mmmmmm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmm}\foo \foo code
{\__xparse_grab_m_6:w }{}{}.
<recently read> }
l. ...}
@@ -122,7 +122,7 @@
.
. Redefining command \foo with sig. 'mmmmmmm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmm}\foo \foo code
{\__xparse_grab_m_7:w }{}{}.
<recently read> }
l. ...}
@@ -135,7 +135,7 @@
.
. Redefining command \foo with sig. 'mmmmmmmm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmmm}\foo \foo code
{\__xparse_grab_m_8:w }{}{}.
<recently read> }
l. ...}
@@ -148,7 +148,7 @@
.
. Redefining command \foo with sig. 'mmmmmmmmm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmmmm}\foo \foo code
{\__xparse_grab_m_9:w }{}{}.
<recently read> }
l. ...}
@@ -182,7 +182,7 @@
| LaTeX has been asked to define a function '\foo code' with 10 arguments. TeX
| allows between 0 and 9 arguments for a single function.
|...............................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmmmmm}\foo \foo code
{\__xparse_grab_m_10:w }{}{}.
<recently read> }
l. ...}
@@ -198,7 +198,7 @@
.
. Defining command \foo with sig. '+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {+m}\foo \foo code
{\__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -210,7 +210,7 @@
.
. Redefining command \foo with sig. 'm+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {m+m}\foo \foo code
{\__xparse_grab_m_1:w \__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -222,7 +222,7 @@
.
. Redefining command \foo with sig. 'mm+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mm+m}\foo \foo code
{\__xparse_grab_m_2:w \__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -234,7 +234,7 @@
.
. Redefining command \foo with sig. 'mmm+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmm+m}\foo \foo code
{\__xparse_grab_m_3:w \__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -246,7 +246,7 @@
.
. Redefining command \foo with sig. 'mmmm+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmm+m}\foo \foo code
{\__xparse_grab_m_4:w \__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -258,7 +258,7 @@
.
. Redefining command \foo with sig. 'mmmmm+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmm+m}\foo \foo code
{\__xparse_grab_m_5:w \__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -270,7 +270,7 @@
.
. Redefining command \foo with sig. 'mmmmmm+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmm+m}\foo \foo code
{\__xparse_grab_m_6:w \__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -283,7 +283,7 @@
.
. Redefining command \foo with sig. 'mmmmmmm+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmm+m}\foo \foo code
{\__xparse_grab_m_7:w \__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -296,7 +296,7 @@
.
. Redefining command \foo with sig. 'mmmmmmmm+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmmm+m}\foo \foo code
{\__xparse_grab_m_8:w \__xparse_grab_m_long:w }{}{}.
<recently read> }
l. ...}
@@ -313,7 +313,7 @@
.
. Defining command \foo with sig. '>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {>{\foo }m}\foo \foo code
{\__xparse_grab_m:w }{}{{{\foo }}}.
<recently read> }
l. ...}
@@ -325,7 +325,7 @@
.
. Redefining command \foo with sig. 'm>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {m>{\foo }m}\foo \foo code
{\__xparse_grab_m_1:w \__xparse_grab_m:w }{}{{}{{\foo }}}.
<recently read> }
l. ...}
@@ -337,7 +337,7 @@
.
. Redefining command \foo with sig. 'mm>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mm>{\foo }m}\foo \foo code
{\__xparse_grab_m_2:w \__xparse_grab_m:w }{}{{}{}{{\foo }}}.
<recently read> }
l. ...}
@@ -349,7 +349,7 @@
.
. Redefining command \foo with sig. 'mmm>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmm>{\foo }m}\foo \foo code
{\__xparse_grab_m_3:w \__xparse_grab_m:w }{}{{}{}{}{{\foo }}}.
<recently read> }
l. ...}
@@ -361,8 +361,8 @@
.
. Redefining command \foo with sig. 'mmmm>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
-{\__xparse_grab_m_4:w \__xparse_grab_m:w }{}{{}{}{}{}{{\foo }}}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmm>{\foo }m}\foo \foo
+code {\__xparse_grab_m_4:w \__xparse_grab_m:w }{}{{}{}{}{}{{\foo }}}.
<recently read> }
l. ...}
> \foo code=\protected\long macro:#1#2#3#4#5->(#1)(#2)(#3)(#4)(#5).
@@ -373,8 +373,8 @@
.
. Redefining command \foo with sig. 'mmmmm>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
-{\__xparse_grab_m_5:w \__xparse_grab_m:w }{}{{}{}{}{}{}{{\foo }}}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmm>{\foo }m}\foo \foo
+code {\__xparse_grab_m_5:w \__xparse_grab_m:w }{}{{}{}{}{}{}{{\foo }}}.
<recently read> }
l. ...}
> \foo code=\protected\long macro:#1#2#3#4#5#6->(#1)(#2)(#3)(#4)(#5)(#6).
@@ -385,8 +385,8 @@
.
. Redefining command \foo with sig. 'mmmmmm>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
-{\__xparse_grab_m_6:w \__xparse_grab_m:w }{}{{}{}{}{}{}{}{{\foo }}}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmm>{\foo }m}\foo \foo
+code {\__xparse_grab_m_6:w \__xparse_grab_m:w }{}{{}{}{}{}{}{}{{\foo }}}.
<recently read> }
l. ...}
> \foo code=\protected\long
@@ -398,8 +398,8 @@
.
. Redefining command \foo with sig. 'mmmmmmm>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
-{\__xparse_grab_m_7:w \__xparse_grab_m:w }{}{{}{}{}{}{}{}{}{{\foo }}}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmm>{\foo }m}\foo \foo
+code {\__xparse_grab_m_7:w \__xparse_grab_m:w }{}{{}{}{}{}{}{}{}{{\foo }}}.
<recently read> }
l. ...}
> \foo code=\protected\long
@@ -411,8 +411,8 @@
.
. Redefining command \foo with sig. 'mmmmmmmm>{\foo }m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
-{\__xparse_grab_m_8:w \__xparse_grab_m:w }{}{{}{}{}{}{}{}{}{}{{\foo }}}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mmmmmmmm>{\foo }m}\foo \foo
+code {\__xparse_grab_m_8:w \__xparse_grab_m:w }{}{{}{}{}{}{}{}{}{}{{\foo }}}.
<recently read> }
l. ...}
> \foo code=\protected\long
@@ -444,7 +444,7 @@
.
. Defining command \foo with sig. 'lm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {lm}\foo \foo code
{\__xparse_grab_l:w \__xparse_grab_m_1:w }{}{}.
<recently read> }
l. ...}
@@ -456,7 +456,7 @@
.
. Redefining command \foo with sig. 'mlm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mlm}\foo \foo code
{\__xparse_grab_m_1:w \__xparse_grab_l:w \__xparse_grab_m_1:w }{}{}.
<recently read> }
l. ...}
@@ -468,8 +468,8 @@
.
. Redefining command \foo with sig. 'u{end}u{stop!}' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
-{\__xparse_grab_u:w {end}\__xparse_grab_u:w {stop!}}{}{}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {u{end}u{stop!}}\foo \foo
+code {\__xparse_grab_u:w {end}\__xparse_grab_u:w {stop!}}{}{}.
<recently read> }
l. ...}
> \foo code=\protected\long macro:#1#2->(#1)(#2).
@@ -480,7 +480,7 @@
.
. Redefining command \foo with sig. 'lll' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {lll}\foo \foo code
{\__xparse_grab_l:w \__xparse_grab_l:w \__xparse_grab_l:w }{}{}.
<recently read> }
l. ...}
@@ -492,8 +492,8 @@
.
. Redefining command \foo with sig. '+l>{\foo }u{end}' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
-{\__xparse_grab_l_long:w \__xparse_grab_u:w {end}}{}{{}{{\foo }}}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {+l>{\foo }u{end}}\foo \foo
+code {\__xparse_grab_l_long:w \__xparse_grab_u:w {end}}{}{{}{{\foo }}}.
<recently read> }
l. ...}
> \foo code=\protected\long macro:#1#2->(#1)(#2).
@@ -508,7 +508,7 @@
.
. Defining command \foo with sig. 'som' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {som}\foo \foo code
{\__xparse_grab_t:w *\__xparse_grab_D:w []\__xparse_grab_m_1:w
}{.{.-NoValue-}.}{}.
<recently read> }
@@ -521,7 +521,7 @@
.
. Redefining command \foo with sig. 't+d()+m' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {t+d()+m}\foo \foo code
{\__xparse_grab_t:w +\__xparse_grab_D:w ()\__xparse_grab_m_long:w
}{.{.-NoValue-}.}{}.
<recently read> }
@@ -534,9 +534,9 @@
.
. Redefining command \foo with sig. '+t\par O{default}mmm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
-{\__xparse_grab_t_long:w \par \__xparse_grab_D:w []\__xparse_grab_m_3:w
-}{.{.default}...}{}.
+> \foo=\protected macro:->\__xparse_start:nNNnnn {+t\par O{default}mmm}\foo
+\foo code {\__xparse_grab_t_long:w \par \__xparse_grab_D:w
+[]\__xparse_grab_m_3:w }{.{.default}...}{}.
<recently read> }
l. ...}
> \foo code=\protected\long macro:#1#2#3#4#5->(#1)(#2)(#3)(#4).
@@ -547,7 +547,7 @@
.
. Redefining command \foo with sig. 'momo' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {momo}\foo \foo code
{\__xparse_grab_m_1:w \__xparse_grab_D:w []\__xparse_grab_m_1:w
\__xparse_grab_D_trailing:w []}{.{.-NoValue-}.{.-NoValue-}}{}.
<recently read> }
@@ -560,7 +560,7 @@
.
. Redefining command \foo with sig. 'mgom' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mgom}\foo \foo code
{\__xparse_grab_m_1:w \__xparse_grab_G:w \__xparse_grab_D:w
[]\__xparse_grab_m_1:w }{.{.-NoValue-}{.-NoValue-}.}{}.
<recently read> }
@@ -573,7 +573,7 @@
.
. Redefining command \foo with sig. 'mG{test}sm' on line ....
.................................................
-> \foo=\protected macro:->\__xparse_start_cmd:NNnnn \foo \foo code
+> \foo=\protected macro:->\__xparse_start:nNNnnn {mG{test}sm}\foo \foo code
{\__xparse_grab_m_1:w \__xparse_grab_G:w \__xparse_grab_t:w
*\__xparse_grab_m_1:w }{.{.test}..}{}.
<recently read> }
@@ -650,8 +650,8 @@
.
. Defining command \foo with sig. 'm' on line ....
.................................................
-> \foo=macro:->\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN
-\foo code \q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {m}\foo \foo code
+{\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1->(#1).
@@ -662,8 +662,8 @@
.
. Redefining command \foo with sig. '+m' on line ....
.................................................
-> \foo=macro:->\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN
-\foo code \q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {+m}\foo \foo code
+{\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1->(#1).
@@ -674,9 +674,9 @@
.
. Redefining command \foo with sig. 'mmm' on line ....
.................................................
-> \foo=macro:->\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w
-\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN \foo code
-\q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {mmm}\foo \foo code
+{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w
+\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2#3->(#1)(#2)(#3).
@@ -687,9 +687,9 @@
.
. Redefining command \foo with sig. 'om' on line ....
.................................................
-> \foo=macro:->\__xparse_expandable_grab_D:w \foo (arg 1)
-[]{-NoValue-}\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN
-\foo code \q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {om}\foo \foo code
+{\__xparse_expandable_grab_D:w \foo (arg 1)
+[]{-NoValue-}\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2->(#1)(#2).
@@ -700,9 +700,9 @@
.
. Redefining command \foo with sig. '+o+m' on line ....
.................................................
-> \foo=macro:->\__xparse_expandable_grab_D:w \foo (arg 1)
-[]{-NoValue-}\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN
-\foo code \q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {+o+m}\foo \foo code
+{\__xparse_expandable_grab_D:w \foo (arg 1)
+[]{-NoValue-}\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2->(#1)(#2).
@@ -713,9 +713,8 @@
.
. Redefining command \foo with sig. 'sm' on line ....
.................................................
-> \foo=macro:->\__xparse_expandable_grab_t:w \foo (arg 1)
-*\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN \foo code
-\q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {sm}\foo \foo code
+{\__xparse_expandable_grab_t:w \foo (arg 1) *\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2->(#1)(#2).
@@ -726,10 +725,10 @@
.
. Redefining command \foo with sig. 'osm' on line ....
.................................................
-> \foo=macro:->\__xparse_expandable_grab_D:w \foo (arg 1)
+> \foo=macro:->\__xparse_start_expandable:nNNn {osm}\foo \foo code
+{\__xparse_expandable_grab_D:w \foo (arg 1)
[]{-NoValue-}\__xparse_expandable_grab_t:w \foo (arg 2)
-*\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN \foo code
-\q__xparse \foo .
+*\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2#3->(#1)(#2)(#3).
@@ -761,9 +760,9 @@
| Expandable commands must have a final mandatory argument (or no arguments at
| all). You cannot have a terminal optional argument with expandable commands.
|...............................................
-> \foo=macro:->\__xparse_expandable_grab_m:w \__xparse_expandable_grab_D:w
-\foo (arg 2) []{-NoValue-}\__xparse_grab_expandable_end:wN \foo code
-\q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {mo}\foo \foo code
+{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_D:w \foo (arg 2)
+[]{-NoValue-}}.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2->(#1).
@@ -808,9 +807,9 @@
| The arguments for an expandable command must either all be short or all be
| long. You have tried to mix the two types.
|...............................................
-> \foo=macro:->\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w
-\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN \foo code
-\q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {+mmm}\foo \foo code
+{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w
+\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2#3->(#1)(#2)(#3).
@@ -838,9 +837,9 @@
| The arguments for an expandable command must either all be short or all be
| long. You have tried to mix the two types.
|...............................................
-> \foo=macro:->\__xparse_expandable_grab_D:w \foo (arg 1)
-[]{-NoValue-}\__xparse_expandable_grab_m:w \__xparse_grab_expandable_end:wN
-\foo code \q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {o+m}\foo \foo code
+{\__xparse_expandable_grab_D:w \foo (arg 1)
+[]{-NoValue-}\__xparse_expandable_grab_m:w }.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2->(#1)(#2).
@@ -868,9 +867,9 @@
| Expandable commands must have a final mandatory argument (or no arguments at
| all). You cannot have a terminal optional argument with expandable commands.
|...............................................
-> \foo=macro:->\__xparse_expandable_grab_R:w \foo (arg 1)
-(){-NoValue-}\__xparse_expandable_grab_D:w \foo (arg 2)
-[]{-NoValue-}\__xparse_grab_expandable_end:wN \foo code \q__xparse \foo .
+> \foo=macro:->\__xparse_start_expandable:nNNn {r()o}\foo \foo code
+{\__xparse_expandable_grab_R:w \foo (arg 1)
+(){-NoValue-}\__xparse_expandable_grab_D:w \foo (arg 2) []{-NoValue-}}.
<recently read> }
l. ...}
> \foo code=\long macro:#1#2->(#1)(#2).
@@ -912,7 +911,7 @@
| defined.
| A new environment 'foo' will be created.
|...............................................
-> \environment foo=\protected macro:->\__xparse_start_cmd:NNnnn \environment
+> \environment foo=\protected macro:->\__xparse_start:nNNnnn {}\environment
foo \environment foo code {}{}{}.
<recently read> }
l. ...}
@@ -929,7 +928,7 @@
.
. Defining environment 'foo' with sig. 'mmm' on line ....
.................................................
-> \environment foo=\protected macro:->\__xparse_start_cmd:NNnnn \environment
+> \environment foo=\protected macro:->\__xparse_start:nNNnnn {mmm}\environment
foo \environment foo code {\__xparse_grab_m_3:w }{}{}.
<recently read> }
l. ...}
@@ -943,7 +942,7 @@
.
. Redefining environment 'foo' with sig. 'som' on line ....
.................................................
-> \environment foo=\protected macro:->\__xparse_start_cmd:NNnnn \environment
+> \environment foo=\protected macro:->\__xparse_start:nNNnnn {som}\environment
foo \environment foo code {\__xparse_grab_t:w *\__xparse_grab_D:w
[]\__xparse_grab_m_1:w }{.{.-NoValue-}.}{}.
<recently read> }
@@ -958,9 +957,9 @@
.
. Redefining environment 'foo' with sig. 'so+m' on line ....
.................................................
-> \environment foo=\protected macro:->\__xparse_start_cmd:NNnnn \environment
-foo \environment foo code {\__xparse_grab_t:w *\__xparse_grab_D:w
-[]\__xparse_grab_m_long:w }{.{.-NoValue-}.}{}.
+> \environment foo=\protected macro:->\__xparse_start:nNNnnn
+{so+m}\environment foo \environment foo code {\__xparse_grab_t:w
+*\__xparse_grab_D:w []\__xparse_grab_m_long:w }{.{.-NoValue-}.}{}.
<recently read> }
l. ...}
> \environment foo code=\protected\long macro:#1#2#3->\cs_set_nopar:Npx
@@ -973,9 +972,9 @@
.
. Redefining environment 'foo' with sig. 'u{stop}om' on line ....
.................................................
-> \environment foo=\protected macro:->\__xparse_start_cmd:NNnnn \environment
-foo \environment foo code {\__xparse_grab_u:w {stop}\__xparse_grab_D:w
-[]\__xparse_grab_m_1:w }{.{.-NoValue-}.}{}.
+> \environment foo=\protected macro:->\__xparse_start:nNNnnn
+{u{stop}om}\environment foo \environment foo code {\__xparse_grab_u:w
+{stop}\__xparse_grab_D:w []\__xparse_grab_m_1:w }{.{.-NoValue-}.}{}.
<recently read> }
l. ...}
> \environment foo code=\protected\long macro:#1#2#3->\cs_set_nopar:Npx
@@ -988,7 +987,7 @@
.
. Redefining environment 'foo' with sig. 'moo' on line ....
.................................................
-> \environment foo=\protected macro:->\__xparse_start_cmd:NNnnn \environment
+> \environment foo=\protected macro:->\__xparse_start:nNNnnn {moo}\environment
foo \environment foo code {\__xparse_grab_m_1:w \__xparse_grab_D_trailing:w
[]\__xparse_grab_D_trailing:w []}{.{.-NoValue-}{.-NoValue-}}{}.
<recently read> }
Modified: trunk/l3packages/xparse/xparse.dtx
===================================================================
--- trunk/l3packages/xparse/xparse.dtx 2017-02-09 03:07:27 UTC (rev 6855)
+++ trunk/l3packages/xparse/xparse.dtx 2017-02-09 04:01:50 UTC (rev 6856)
@@ -818,14 +818,6 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\l_@@_command_arg_specs_prop}
-% Used to record all document commands created, and the argument
-% specifications that go with these.
-% \begin{macrocode}
-\prop_new:N \l_@@_command_arg_specs_prop
-% \end{macrocode}
-% \end{variable}
-%
% \begin{variable}{\l_@@_current_arg_int}
% The number of the current argument being set up: this is used for creating
% the expandable auxiliary functions, and also to indicate if all arguments
@@ -855,14 +847,6 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\l_@@_environment_arg_specs_prop}
-% Used to record all document environment created, and the argument
-% specifications that go with these.
-% \begin{macrocode}
-\prop_new:N \l_@@_environment_arg_specs_prop
-% \end{macrocode}
-% \end{variable}
-%
% \begin{variable}{\l_@@_expandable_bool}
% Used to indicate if an expandable command is begin generated, as this
% affects both the acceptable argument types and how they are implemented.
@@ -1012,7 +996,6 @@
\__msg_kernel_info:nnxx { xparse } { define-command }
{ \token_to_str:N #1 } { \tl_to_str:n {#2} }
}
- \prop_put:Nnn \l_@@_command_arg_specs_prop {#1} {#2}
\bool_set_false:N \l_@@_environment_bool
\@@_declare_cmd_internal:Nnn #1 {#2}
}
@@ -1026,7 +1009,7 @@
\tl_set:Nx \l_@@_function_tl { \cs_to_str:N #1 }
\@@_normalize_arg_spec:n {#2}
\exp_args:No \@@_prepare_signature:n \l_@@_arg_spec_tl
- \@@_declare_cmd_code:Nn #1 {#3}
+ \@@_declare_cmd_code:Nnn #1 {#2} {#3}
\@@_break_point:n {#2}
}
\cs_generate_variant:Nn \@@_declare_cmd_internal:Nnn { cnx }
@@ -1042,31 +1025,32 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_declare_cmd_code:Nn}
+% \begin{macro}{\@@_declare_cmd_code:Nnn}
% \begin{macro}[aux]
-% {\@@_declare_cmd_code_aux:Nn, \@@_declare_cmd_code_expandable:Nn}
+% {\@@_declare_cmd_code_aux:Nnn, \@@_declare_cmd_code_expandable:Nnn}
% The appropriate auxiliary is called.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_declare_cmd_code:Nn
+\cs_new_protected:Npn \@@_declare_cmd_code:Nnn
{
\bool_if:NTF \l_@@_expandable_bool
- { \@@_declare_cmd_code_expandable:Nn }
- { \@@_declare_cmd_code_aux:Nn }
+ { \@@_declare_cmd_code_expandable:Nnn }
+ { \@@_declare_cmd_code_aux:Nnn }
}
% \end{macrocode}
% Standard functions call
-% \cs{@@_start_cmd:NNnnn}, which receives an auxiliary used for
+% \cs{@@_start:nNNnnn}, which receives an auxiliary used for
% grabbing arguments, an auxiliary containing the code, and then the
% signature, default arguments, and processors.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_declare_cmd_code_aux:Nn #1#2
+\cs_new_protected:Npn \@@_declare_cmd_code_aux:Nnn #1#2#3
{
\cs_generate_from_arg_count:cNnn
{ \l_@@_function_tl \c_space_tl code }
- \cs_set_protected:Npn \l_@@_current_arg_int {#2}
+ \cs_set_protected:Npn \l_@@_current_arg_int {#3}
\cs_set_protected_nopar:Npx #1
{
- \@@_start_cmd:NNnnn
+ \@@_start:nNNnnn
+ { \exp_not:n {#2} }
\exp_not:c { \l_@@_function_tl \c_space_tl }
\exp_not:c { \l_@@_function_tl \c_space_tl code }
{ \exp_not:o \l_@@_signature_tl }
@@ -1080,18 +1064,18 @@
}
}
}
-\cs_new_protected:Npn \@@_declare_cmd_code_expandable:Nn #1#2
+\cs_new_protected:Npn \@@_declare_cmd_code_expandable:Nnn #1#2#3
{
\cs_generate_from_arg_count:cNnn
{ \l_@@_function_tl \c_space_tl code }
- \cs_set:Npn \l_@@_current_arg_int {#2}
+ \cs_set:Npn \l_@@_current_arg_int {#3}
\cs_set_nopar:Npx #1
{
- \exp_not:o \l_@@_signature_tl
- \exp_not:N \@@_grab_expandable_end:wN
- \exp_not:c { \l_@@_function_tl \c_space_tl code }
- \exp_not:N \q_@@
- \exp_not:c { \l_@@_function_tl \c_space_tl }
+ \exp_not:N \@@_start_expandable:nNNn
+ { \exp_not:n {#2} }
+ \exp_not:c { \l_@@_function_tl \c_space_tl }
+ \exp_not:c { \l_@@_function_tl \c_space_tl code }
+ { \exp_not:o \l_@@_signature_tl }
}
\bool_if:NTF \l_@@_all_long_bool
{ \cs_set:cpx }
@@ -1124,7 +1108,6 @@
\__msg_kernel_info:nnxx { xparse } { define-environment }
{#1} { \tl_to_str:n {#2} }
}
- \prop_put:Nnn \l_@@_environment_arg_specs_prop {#1} {#2}
\bool_set_false:N \l_@@_expandable_bool
\bool_set_true:N \l_@@_environment_bool
\@@_declare_env_internal:nnnn {#1} {#2}
@@ -1163,21 +1146,34 @@
% \end{macro}
% \end{macro}
%
-% \subsection{Structure of non-expandable \pkg{xparse} commands}
+% \subsection{Structure of \pkg{xparse} commands}
%
-% \begin{macro}{\@@_start_cmd:NNnnn}
+% \begin{macro}{\@@_start_expandable:nNNn}
+% This is called for all expandable commands. |#4| is the signature,
+% responsible for grabbing arguments. |#3| is the code to run.
+% |#2|~is a function (named after the command) that grabs a single
+% argument in the input stream. The argument specification |#1| is
+% unused but used by diagnostic functions.
+% \begin{macrocode}
+\cs_new:Npn \@@_start_expandable:nNNn #1#2#3#4
+ { #4 \@@_grab_expandable_end:wN #3 \q_@@ #2 }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_start:nNNnnn}
% This sets up a few variables to minimize the boilerplate code
% included in all \pkg{xparse}-defined commands. It then runs the
-% grabbers~|#3|.
+% grabbers~|#4|. Again, the argument specification |#1| is only for
+% diagnostics.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_start_cmd:NNnnn #1#2#3#4#5
+\cs_new_protected:Npn \@@_start:nNNnnn #1#2#3#4#5#6
{
\tl_clear:N \l_@@_args_tl
- \tl_set:Nn \l_@@_fn_tl {#1}
- \tl_set:Nn \l_@@_fn_code_tl {#2}
- \tl_set:Nn \l_@@_defaults_tl {#4}
- \tl_set:Nn \l_@@_process_all_tl {#5}
- #3 \@@_run_code:
+ \tl_set:Nn \l_@@_fn_tl {#2}
+ \tl_set:Nn \l_@@_fn_code_tl {#3}
+ \tl_set:Nn \l_@@_defaults_tl {#5}
+ \tl_set:Nn \l_@@_process_all_tl {#6}
+ #4 \@@_run_code:
}
% \end{macrocode}
% \end{macro}
@@ -3323,22 +3319,37 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@@_get_arg_spec:NTF}
+% If the command is not an \pkg{xparse} command, complain. If it is,
+% its second \enquote{item} is the argument specification.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_get_arg_spec:NTF #1#2#3
+ {
+ \@@_cmd_if_xparse:NTF #1
+ {
+ \tl_set:Nx \ArgumentSpecification { \tl_item:Nn #1 { 2 } }
+ #2
+ }
+ {#3}
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\@@_get_arg_spec:N}
% \begin{macro}{\@@_get_arg_spec:n}
% \begin{variable}{\ArgumentSpecification}
-% Recovering the argument specification is trivial, using the
-% branching \cs{prop_get:NnN} function.
+% Recovering the argument specification is now trivial.
% \begin{macrocode}
\cs_new_protected:Npn \@@_get_arg_spec:N #1
{
- \prop_get:NnNF \l_@@_command_arg_specs_prop {#1}
- \ArgumentSpecification
+ \@@_get_arg_spec:NTF #1 { }
{ \@@_get_arg_spec_error:N #1 }
}
\cs_new_protected:Npn \@@_get_arg_spec:n #1
{
- \prop_get:NnNF \l_@@_environment_arg_specs_prop {#1}
- \ArgumentSpecification
+ \exp_args:Nc \@@_get_arg_spec:NTF
+ { environment~ \tl_to_str:n {#1} }
+ { }
{ \@@_get_arg_spec_error:n {#1} }
}
\tl_new:N \ArgumentSpecification
@@ -3354,15 +3365,14 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_show_arg_spec:N #1
{
- \prop_get:NnNTF \l_@@_command_arg_specs_prop {#1}
- \ArgumentSpecification
+ \@@_get_arg_spec:NTF #1
{ \tl_show:N \ArgumentSpecification }
{ \@@_get_arg_spec_error:N #1 }
}
\cs_new_protected:Npn \@@_show_arg_spec:n #1
{
- \prop_get:NnNTF \l_@@_environment_arg_specs_prop {#1}
- \ArgumentSpecification
+ \exp_args:Nc \@@_get_arg_spec:NTF
+ { environment~ \tl_to_str:n {#1} }
{ \tl_show:N \ArgumentSpecification }
{ \@@_get_arg_spec_error:n {#1} }
}
@@ -3483,6 +3493,34 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\@@_cmd_if_xparse:NTF}
+% \begin{macro}[aux]{\@@_cmd_if_xparse_aux:N}
+% To determine whether the command is an \pkg{xparse} command check
+% that its |arg_spec| is empty (this also excludes non-macros) and
+% that its |replacement_spec| starts with either \cs{@@_start:nNNnnn}
+% (non-expandable command) or \cs{@@_start_expandable:nNNn}
+% (expandable command).
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_cmd_if_xparse:NTF #1
+ {
+ \exp_args:Nf \str_case_x:nnTF
+ {
+ \exp_args:Nf \tl_if_empty:nT { \token_get_arg_spec:N #1 }
+ {
+ \exp_last_unbraced:Nf \@@_cmd_if_xparse_aux:w
+ { \token_get_replacement_spec:N #1 } ~ \q_stop
+ }
+ }
+ {
+ { \token_to_str:N \@@_start:nNNnnn } { }
+ { \token_to_str:N \@@_start_expandable:nNNn } { }
+ }
+ }
+\cs_new:Npn \@@_cmd_if_xparse_aux:w #1 ~ #2 \q_stop {#1}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Messages}
%
% Some messages intended as errors.
More information about the latex3-commits
mailing list