[luatex] \lastnamedcs and \begincsname with empty csname

Joseph Wright joseph.wright at morningstar2.co.uk
Sun Jan 7 22:34:39 CET 2018


Testing out how \lastnamedcs and \begincsname behave for some LaTeX 
kernel work, the following has come up:

   \expandafter\def\csname #1\endcsname{abc}
   \message{\begincsname #1\endcsname}}

\expandafter\let\expandafter\x\csname abc\endcsname
\expandafter\show\lastnamedcs a

\expandafter\let\expandafter\x\csname hbox\endcsname
\expandafter\show\lastnamedcs b

\expandafter\show\lastnamedcs c


As you'll see, with an empty csname, both \lastnamedcs and \begincsname 
give (possibly) surprising results. Is this by-design?


More information about the luatex mailing list