<div dir="ltr">
<span class="gmail-im">> \exp_args:Nxx \setmathfont<br>
>   { \tl_use:N \c__test_MathFont_tl }<br>
>   { [ \tl_use:N \c__test_MathFontSpec_tl ] }<br>
><br></span><div>
> Thanks for the explanations but this form does not work <br></div><div><br></div><div>the x expansion leaves in the braces so this ends up as</div><div><br></div><div>\setmainfont{somefontname}{[expansionof \c_...]}</div><div><br></div><div>but the braces prevent the optional argument from being seen.</div><div><br></div><div>it's not really an expl3 (or xetex) question, you would see the same with</div><div><br></div><div>\edef\foo{\noexpand\setmainfont{\zzz}{[\qqq]}}</div><div>\foo</div><div><br></div><div>(which is more or less what x-expansion is)</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div>