<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 12, 2020 at 4:26 PM David Carlisle <<a href="mailto:d.p.carlisle@gmail.com">d.p.carlisle@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 12 May 2020 at 09:55, Petr Olsak <<a href="mailto:petr@olsak.net" target="_blank">petr@olsak.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
I started to using LuaTeX with my macros (OpTeX) and I reached first <br>
problem.<br>
<br>
---------------------------------<br>
<br>
\toks0={A}<br>
<br>
{\toksapp0{B}\the\toks0 }<br>
<br>
\the\toks0<br>
<br>
--------------------------------<br>
<br>
This is LuaTeX, Version 1.12.0 (TeX Live 2020)<br>
<br>
--------------------------------<br>
<br>
I expected that first printing of \toks0 gives AB and the second only A. <br>
But it is not true. The second printing is AB too.<br>
<br>
It seems that \toksapp (and variants) makes global assignment. The <br>
manual of LuaTeX does not mention explicitly that the assignment is <br>
local, but the \g* variants are here and they are global. So, I derived, <br>
that non-\g* variants are local. But it is not true.<br>
<br>
Petr Olšák<br>
<br>
<br>
<br></blockquote><div>I can confirm you get A in texlive 2018 but AB in 2019 and 2020 (which seems wrong)</div><div><br></div><div>David</div><div><br> </div></div></div>
</blockquote></div><br clear="all"><div>I will see it this evening</div><div><br></div>-- <br><div dir="ltr" class="gmail_signature">luigi<br></div></div>