On the question How to make \meaningbody say the command is undefined? the \meaningbody command from Equivalent of \show to display the LaTeX code in the document was fixed to correctly display undefined commands. But after @egreg commented on the @David Carlisle answer saying: What about \meaningbody\box? Then I tried this:
\documentclass{article}
\makeatletter
\newcommand{\meaningbody}[1]
{%
{\ttfamily
\ifdefined#1
\expandafter\strip@prefix\meaning#1
\else
`The command \string#1 is undefined.'
\fi}%
}
\makeatother
\begin{document}
\meaningbody\box
\meaning\box
\end{document}
And it does the strange error:
! Argument of \strip@prefix has an extra }.
<inserted text>
\par
l.17 \meaningbody\box
When I just do \meaning\box it outputs “box on the PDF:
Why would be \box is different?
