<div dir="ltr">Thanks. but I should also add that there is one more requirement. If \cs is primitive but also redefined, e.g. \par or \input in LaTeX, it should return Macro not primitive like:<br><br>\ifprimitivecs{par}{Primitive}{Macro}<br>
<br>should return macro. Can \token_if_primitive:NTF do that?<br><br><div class="gmail_quote">On Sun, Oct 9, 2011 at 2:13 AM, Philipp Stephani <span dir="ltr"><<a href="mailto:p.stephani2@googlemail.com">p.stephani2@googlemail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">2011/10/8 Vafa Khalighi <<a href="mailto:vafaklg@gmail.com">vafaklg@gmail.com</a>>:<br>
<div class="im">> How can you test if a control sequence is primitive or not?<br>
<br>
</div>See the function \token_if_primitive:NTF in l3token (documentation is<br>
in source3.pdf) for a possible solution.<br>
</blockquote></div><br></div>