[Tex/LaTex] What does \def\foo#{…} mean?

macros

I came across this idiom recently:

\def\foo#{...}

That is, a hash but no parameter number. What might be the purpose of this?

Best Answer

It grabs the content until the next brace (or group). For example:

\def\foo#1#{«#1»}

\starttext
\foo random content {until braces}
\stoptext

gives

enter image description here