Consider the following MWE.
\documentclass{minimal}
\usepackage{lipsum}
\newcommand*{\mynoindent}{\noindent}
\newcommand*{\yournoindent}[1]{\noindent}
\begin{document}
\noindent
\lipsum[1]
\mynoindent
\lipsum[1]
\yournoindent{stuff}
\lipsum[1]
\end{document}
This outputs the following.
Here are close-ups of the relevant indentations (the first two are identical, and so I only show one of those).

If you look closely, you can see that the second is indented every so slightly. How can I go about fixing this?
(Of course, in this example, I don't actually use the parameter, but for what I want to do, I need to be able to send a parameter to a command that ends in a \noindent.)
\noindentin the definition of a top level latex command anyway (it is only used in one place in the latex format, in\@hangfromwhich isn't really a latex command, just a remnant of plain tex. – David Carlisle Jul 11 '16 at 09:09\defin a top-level LaTeX command? In this case, there is the LaTeX\newcommand. What is the LaTeX version of\noindent? – Jonathan Gleason Jul 11 '16 at 13:54\newcommandresolves to\defanyway so if you know what you are doing and know it is safe to omit some checks then\defworks. But\noindent(as demonstrated here) almost always does the wrong thing. if you look where indentation is suppressed eg after a section heading, latex never uses\noindent(and here you should probably be using the same\@afterheadinghook to control that). Unlike\defwhere latex uses\defwrapped in\newcommandlatex really doesn't use\noindentat all. – David Carlisle Jul 11 '16 at 13:58\section. More specifically, I have a command\Stepthat takes a single argument and outputs "Step<counter>:<argument>". It then ends the paragraph, and finally ends with a\noindent(and now\noindent\ignorespaces) (it also of course increases the counter). – Jonathan Gleason Jul 11 '16 at 14:04\@startsection(basically a copy of say subsubsection from article.cls but with modified formatting of the argument and number) – David Carlisle Jul 11 '16 at 14:15