Using #auctex in #emacs, I can use C-c C-e to insert an environment. If I choose "equation", the environment together with a label is inserted:
\begin{equation}
\label{eq:1}
\end{equation}
I know that I can define new environments using LaTeX-add-environments, and for example, after (LaTeX-add-environments '("definition")), this environment is offered in completion. But what else do I need in order for a label such as \label{def:1} to be inserted?