I suggest you include the following code in the preamble:
\usepackage{etoolbox}
\AtBeginDocument{%
\let\orignewpage\newpage
\renewcommand\newpage{}
\patchcmd{\clearpage}{\newpage}{\orignewpage}{}{}}
That way, the code chunk
\begin{itemize}
\item A
\item B
\newpage
\item C
\end{itemize}
is assured not to generate a page break between items B and C.
Observe that it's very necessary to patch \clearpage, since \clearpage contains a \newpage directive internally and because \clearpage is used by quite a few LaTeX macros, including the \enddocument macro that's run when \end{document} is encountered. For more on the subject of \newpage vs. \clearpage, see the posting Is it wrong to use \clearpage instead of \newpage? (shameless self-citation alert!)
(If other LaTeX macros contain a \newpage directive internally, those macros would need to be patched as well. One such macro, which is defined by the LaTeX kernel, is \cleardoublepage. Fortunately (?) for you, \cleardoublepage doesn't get used by the article document class unless the options \twoside and \openright are both set.)
\newpageis disabled so in particular the\newpagethat is in\end{document}doesn't happen and no page is shipped out. beware what you ask for. – David Carlisle Dec 15 '20 at 21:21\newpageto its initial value before \end{document}. Could you help me to achieve that? Thanks – Colas Dec 15 '20 at 21:23\newpageused in a document. – Colas Dec 15 '20 at 21:24\newpageis used in\clearpageand as such is vital for the float mechanism, if you disable it and use figures or tables they are likely to get lost or the document not terminate – David Carlisle Dec 15 '20 at 21:51Replace alleditor command would have been easier. – John Kormylo Dec 15 '20 at 22:23