[Tex/LaTex] Make enumerate have beamer themes when using enumitem

#enumeratebeamerenumitemitemizelists

I really like the enumitem package, but it seems to have compatibility issues with beamer. I could get them to work together for itemize lists by using the following:

\setitemize{label=\usebeamerfont*{itemize item}
  \usebeamercolor[fg]{itemize item}
  \usebeamertemplate{itemize item}}

It seems to make itemize lists follow the current beamer theme. But I can't seem to do the same thing for enumerate. In particular, when I do this

\setenumerate[1]{label=\usebeamerfont*{enumerate item}}

I get the error "Use of \enumerate doesn't match its definition."

Is it possible to do a similar thing with enumerate to make it follow the current beamer theme?

Best Answer

It can be fixed by protecting the beamer use-commands. This is compilable and uses the color of the Singapore beamer theme:

\documentclass[12pt]{beamer}
\usetheme{Singapore}
\usepackage{enumitem}
\setenumerate[1]{%
  label=\protect\usebeamerfont{enumerate item}%
        \protect\usebeamercolor[fg]{enumerate item}%
        \insertenumlabel.}
\begin{document}
\begin{frame}
  \begin{enumerate}
    \item First item
    \item Second item
  \end{enumerate}
\end{frame}
\end{document}