If I recall correctly, you have removed \beginR, \endR, \beginL and \endL from luatex but if in a latex document I say
\newcommand\beginR{\bgroup\textdir TRT}
\newcommand\endR{\egroup}
and run lualatex on my dopcument, I see that \endR is already defined:
! LaTeX Error: Command \endR already defined.
Or name \end... illegal, see p.192 of the manual.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.3 \newcommand\endR{\egroup}
?
How come?
a minimal ltx file is attached.
test.tex
Description: TeX document
