# Redefined MakeExpression leads to error in interpreting

I’d like to have a TemplateBox that interprets as its content boxes:

MakeExpression[TemplateBox[{boxes_}, "RawBoxes", ___], form_] := boxes


but e.g. the input box TemplateBox[{"0"}, "RawBoxes"] refuses to be interpreted leading to

Syntax::sntxi: Incomplete expression; more input is needed .


Simplifying the rule to the constant one does not eliminate the error:

MakeExpression[TemplateBox[{boxes_}, "Const0", ___], form_] := "0"


Evaluating MakeExpression explicitly works fine.

This makes me be confused about how interpreting boxes in Mathematica works. What do I miss? What am I doing wrong? What is a right way to write ‘MakeExpression’ redefinitions? Thanks.

MakeExpression needs to return a HoldComplete object. So, the following might do what you want:

MakeExpression[TemplateBox[{boxes_}, "RawBoxes", ___], StandardForm] := HoldComplete[boxes]


For example:

CellPrint @ Cell[
BoxData @ TemplateBox[
{RowBox[{"0", "+", "1"}]},
"RawBoxes",
DisplayFunction->(#&)
],
"Input"
]


Evaluating the above cell yields:

RowBox[{"0", "+", "1"}]