Edit: I think this is a duplicate of How can I see the "implementation" of the \LaTeX command? .
I wanted to see the code for the hyperref \autoref command, so created this simple document:
\documentclass{article}
\usepackage{hyperref}
\begin{document}
\show\autoref
\end{document}
However, in the log output, instead of the code, I see:
> \autoref=macro:
->\protect \autoref .
l.4 \show\autoref
Changing line 4 to \show\section shows the code for \section, as expected:
> \section=\long macro:
->\@startsection {section}{1}{\z@ }{-3.5ex \@plus -1ex \@minus -.2ex}{2.3ex \@plus .2ex}{\normalfont \Large \bfseries }.
l.4 \show\section
How can I get the actual code for \autoref?