# Changing the topic of list of listings

I'm using the package listings for the code snippets in my document. But I want them to be named "Code" rather than "listings". I already got that in my document, but when I create a \lstlistoflistings, it still is titled with "Listings".

How can I change the topic to "Code fragments"? (or anything else?)

\documentclass{article}

\usepackage{listings}

\begin{document}

\lstlistoflistings
\renewcommand{\lstlistingname}{Code}

\section{foo}

\begin{lstlisting}[caption={A listing}]
Some source code
\end{lstlisting}

\end{document}


While \lstlistingname gives the name of a single listing, the name for the list of listings is given by \lstlistlistingname. So just do:
\renewcommand{\lstlistlistingname}{Code fragments}