In latex.ltx you can find
\let\kernel@ifnextchar\@ifnextchar
What was this needed for?
In latex.ltx you can find
\let\kernel@ifnextchar\@ifnextchar
What was this needed for?
Some packages (particularly the AMS packages) redefine \@ifnextchar. Usually the redefined version has all of the properties of the original, but there are some places where the original is needed, which is what \kernel@ifnextchar is for.
If you look at the places where it is used, you'll find that it is mainly used in the definitions associated to \newcommand and \newenvironment so that they always behave as intended.
The entire source of the latex.ltx is documented in source2e.pdf (available through texdoc).
It was added due to this bug reported:
http://www.latex-project.org/cgi-bin/ltxbugs2html?category=AMS+LaTeX&pr=amslatex%2F3501
\@ifnextchar, the decision was made to store a twin of it inlatex.ltx.(?) – Ruben Nov 17 '13 at 15:31amsmathpackage: "It should really be fixed in the amsmath package one day, but..." (p.32) but since theamsmathpackages are so widely used it makes sense to have the workaround, so that there exists an\ifnextcharmacro that is guaranteed to work as originally intended. I don't know if that's democratic. It's certainly pragmatic. – Alan Munn Nov 17 '13 at 15:37amswriters should have done someting like\AMS@ifnextcharinstead of redefining the kernel command? (just to understand the direction of your comment) – Ruben Nov 18 '13 at 00:06