[luatex] tex.enableprimitives producing non-primitives?

Manuel Pégourié-Gonnard mpg at elzevir.fr
Wed Sep 23 16:06:07 CEST 2009


Heiko Oberdiek a écrit :
> On Wed, Sep 23, 2009 at 03:51:17PM +0300, Élie Roux wrote:
> 
>> 2009/9/23 Joseph Wright <joseph.wright at morningstar2.co.uk>:
>>> No, \ifpdfprimitve is meant for dealing with circumstances where an
>>> *available* primitive has been redefined. In your test, \attribute is
>>> not available, so of course you also cannot call the primitive.
>> In fact the surprising thing it that tex.enableprimitives does not
>> produce primitives (when used with a prefix),
> 
> It does. See the result of \meaning.
> 
Actually, I think that the result of

tex.enableprimitives('prefix', {'relax'})

is the same as

\let\prefixrelax\relax

(assuming \prefixrelax was previously undefined). And I wouldn't expect

\primitive\prefixrelax

to work after this. So I agree with you that this behaviour is perfectly
consistent: \primitive expects the *natural name* of a primitive. Actually, the
set of names that \primitive accepts is hard-coded in the engine and will not
change at runtime, and it is exactly what I would expect.

Manuel.



More information about the luatex mailing list