# What is the side effect when hyperref has stopped early?

\documentclass{beamer}
\usepackage{lmodern}
\usepackage{caption}
\begin{document}
\begin{frame}{Are you kidding?}
No! I am not a good joker.
\end{frame}
\end{document}

The following is taken from Ulrike's comment:

beamer loads hyperref with the option implicit=false. This option inserts a \endinput in the command \MaybeStopEarly in hyperref and has the effect that about 2000 lines of code of hyperref are not executed. This 2000 lines contains a lot of definitions and redefinitions. One of them is e.g. that it inserts in \@caption the command \hyper@makecurrent{\@captype}. So getting rid of the warning by giving \hyper@makecurrent and empty definition will quite probably not enable hyperref support.

The next question becomes: Why does beamer load incompletely hyperref? What is the purpose?

-
@xport I am not kidding remove \usepackage{caption}:). – Yiannis Lazarides Jun 18 '11 at 20:04
@xport: There's no need to use captions in a presentation. – egreg Jun 18 '11 at 20:13
@egreg: Yes, but it is very special case, I have to present how to use LaTeX to the audience. The presentation must contain LTXexample environment with many other LaTeX environments inside. One of the topics is about caption. – xport Jun 18 '11 at 20:18
@xport: Import your example as a PDF file – egreg Jun 18 '11 at 20:26
@xport use \documentclass[final]{beamer} and it should fix it, seriously:) – Yiannis Lazarides Jun 18 '11 at 20:54

Looking at the caption package documentation, these are the lines which are responsible for the warning:

\@ifundefined{hyper@makecurrent}{% hyperref has stopped early
\caption@WarningNoLine{%
Hyperref support is turned off\MessageBreak
because hyperref has stopped early}%
}{%

Thus, the warning is produced because the hyperref package is not loaded completely when using the beamer document class.

So if you really need to use the caption package and want to get rid of the warning, you could add the following lines

\makeatletter
\newcommand\hyper@makecurrent[1]{}
\makeatother