# Spurious space after command in ConTeXt

Is it possible to define a macro in ConTeXt which gobbles space after the argument? For example, given this input:

\def\thing{\dosingleargument\dothing}
\def\dothing[#1]{thing#1}

\starttext

\thing[hello]
\thing[world]

\stoptext


This produces the following output:

But, ideally, I'd like it to run together, like this:

I realise I can use \thing[hello]%, but just wondering whether there's something easy I may have missed here. These \thing commands are currently being generated by a script. I could configure the script to output the %, but the TeX file is likely to be tweaked by hand afterwards, where it's possible the % may end up missing, and then the space appears again, so I'd like to try and reduce this possible human error and keep the TeX file looking tidy.

• Plain TeX and LaTeX have \ignorespaces, so probably context has too. Feb 18 '21 at 12:26
• It worked! Please post it as an answer. Feb 18 '21 at 12:31
• Erm, it was a guess, I don't even know how to run context, so no, I won't post an answer. Feel free to post it yourself. Feb 18 '21 at 12:32
• Suit yourself :) Feb 18 '21 at 13:08
• @campa As easy as context <jobname> Feb 18 '21 at 13:51

There may be a better way to do this in ConTeXt, but the spurious space was removed after placing \ignorespaces as the end of the macro definition:
\def\thing{\dosingleargument\dothing}

• \ignorespaces is the canonical way to do this in ConTeXt. Mar 4 '21 at 1:11