\addvspace can be used to create commands which can be stacked together without creating unnecessary padding. This is useful for creating commands which start and end with \addvspace so that they can be placed adjacent to each other without using up twice as much padding space as they need. Does anyone know of a similar command for horizontal space? I have a number of commands of the form
\newcommand{\fooAnd}{\hspace{1ex}\texttt{and}\hspace{1ex}}
that I would like to string together, but I only want them separated from each other by 1ex each. (And I want to use commands in the interim that don't have \hspace in them, so just cutting the space down to 0.5ex is not a solution.) Any thoughts?

\addhspace ...d \addhspace not in horizontal mode} \fi l.33 \addhspace{2cm}– Florian Nov 02 '20 at 10:20\addhspace{2cm}is supposed to produce the error message! I added a comment to clarify. – egreg Nov 02 '20 at 11:07