Hello,

test file:

\def\msg#{\immediate\write16}
\msg{\meaning\Xpdfoutput}
\begingroup
  \csname Xpdfoutput\endcsname
\endgroup
\msg{\meaning\Xpdfoutput}
\directlua{tex.enableprimitives('X', {'pdfoutput'})}
\msg{\meaning\Xpdfoutput}
\csname @@end\endcsname\end

Result: 3 x "undefined"

After reading the documentation I expected:
  2 x "undefined", 1 x "\pdfoutput"

| Then it will check for the existence of the constructed csname. If the
| csname is currently undefined (note: that is not the same as \relax), it
| will globally define the csname to have the meaning: run code belonging to
| the primitive `name'. If for some reason the csname is already defined, it
| does nothing and tries the next pair.

Either there is a bug in the implementation or in the
description ("is already defined" --> "is or was already defined").

Workaround:
  \directlua{tex.enableprimitives('Workaround', {'pdfoutput'})}
  \global\let\Xpdfoutput\Workaroundpdfoutput

Yours sincerely
  Heiko <[email protected]>
_______________________________________________
dev-luatex mailing list
[email protected]
http://www.ntg.nl/mailman/listinfo/dev-luatex

Reply via email to