I'm embarrassed to ask this. At one time I knew the answer and even had a printed copy of the code. I have tried texdoc with various options but was unable to come up with the one I needed.
At the moment I am particularly interested in the definitions of \addcontentsline, \contentsline, \addtocontents and any friends.
GOM
\@startsectionfor LaTeX? (points tosource2eand/orlatex.ltx). – Werner Nov 22 '19 at 19:52kpsewhich latex.ltxin the terminal/command prompt and open the file it returns. If you dokpsewhich -a latex.ltxit will also show you the path to the-devversion. In my distribution they are in$TEXMF/texmf-dist/tex/latex/base/latex.ltxand$TEXMF/texmf-dist/tex/latex-dev/base/latex.ltx, respectively. – Phelype Oleinik Nov 22 '19 at 19:57texdoc source2e– David Carlisle Nov 22 '19 at 20:29