pdfTeX version 1.40.0 introduced the primitive \pdfprimitive which the manual describes as follows.

This command executes the primitive meaning of the following control sequence, if it has been redefined or made undefined. If the following control sequence is undefined and never was a primitive, nothing happens and no error is raised. If the control sequence was initially expandable, \pdfprimitive expands either. Otherwise \pdfprimitive doesn’t expand.

(I think “either” should be “too.”)

Is there a way to \let a control sequence to the primitive version? Something like


The idea being that \input could be restored to its original meaning (at least locally). Obviously


is not going to work just as


is not going to work.

1 Answer 1


No, I'm afraid not. When you \let or \def the original definition of primitive to something, the original meaning is no longer available as an accessible token. \pdfprimitive can be used to access the internal definition of the primitive, but that is not the same as 'regenerating' the accessible token. The nearest you can get is


for expandable primitives or


for non-expandable ones.

  • And it would seem that that doesn't work for \endcsname. My use case was fairly ridiculous anyway, so it's not like this is a show stopper. =) Thanks.
    – TH.
    Commented Mar 18, 2011 at 11:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .