On 2/5/2022 12:19 PM, Petr Olsak wrote:
On 2/5/22 12:08 PM, Hans Hagen wrote:
On 2/5/2022 11:43 AM, Petr Olsak wrote:
Hello,
If I try:
\def\test{test}
\afterassignment\test \advance\count0 by2
then \test is processed immediately after the \advance command. But
if I do:
\afterassignment\test \toksapp 0{xx} \the\toks0
then \test waits to another assignment than \toksapp. It means, that
\toksapp <toks> (and friends \gtoksapp etc.) is not assignment. Is it
an intention or a bug?
it's intention ... these prepend and append things are a command class
on their own which is why we have explicit g and x variants
I respect the intention but I don't understand your argument. The \def
is a command on its own too, it has explicit g and x variants and _it
is_ assignment.
After \tracingall we can see {changing \toks0=} {into \toks0=xx} which
is similar report as {changing \m=undefined} {into \m=macro:-> xx} when
\def\m{xx} is traced.
this append and prepend mechanism started out as an experiment and it
has some nasty pitfalls (esp when local and global get mixed) so that is
why it has its own handler
in luametatex it's a bit different but there i can test what happens
when the non prefixed variant is also added (but for different reasons)
to the prefixed handler where afterassignment is handled
but it would anyway be an incompatible change to luatex so be delayed to
after the upcoming code freeze (it might also have a little performance
hit)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
_______________________________________________
dev-luatex mailing list
[email protected]
https://mailman.ntg.nl/mailman/listinfo/dev-luatex