\documentclass{article}
\usepackage{showframe}
\newenvironment{abc}{\par}{\par}
\newcommand\NoindentNextPara{\AddToHookNext{para/begin}{\OmitIndent}}
\begin{document}
text1\par
text2\NoindentNextPara
\begin{abc}
abc
\end{abc}
text4\par
text5
\end{document}
问 `\@doendpe` 的作用机制