The following:

\starttext
\unexpanded\def\lol#1%
{
\begingroup
\let\processword\inframed
\processwords{#1}%
\endgroup
}
\lol{nice $x^2$} %see what happens with the superscript
\stoptext

works with ConTeXt LMTX, but fails with ConTeXt MkIV:

...mtx/tex/texmf-context/tex/context/base/mkiv/attr-ini.lua:144: attempt to call a nil value (upvalue 'currentattributes')

stack traceback:

...mtx/tex/texmf-context/tex/context/base/mkiv/attr-ini.lua:144: in function <...mtx/tex/texmf-context/tex/context/base/mkiv/attr-ini.lua:142>

(...tail calls...)


In both cases, including inline math gives funny outputs.

Regards,

Jairo :)