# Ignore keyword in Listings

Consider the following minimal example:

\documentclass{standalone}
\usepackage{listings}
\begin{document}
\begin{lstlisting}[keywordstyle = \textbf, language = SQL, deletekeywords = {time}]
create table Event (id integer primary key, time date);
\end{lstlisting}
\end{document}


This prints ‘time’ in boldface, using the listings package revision 15878 (1.4), TeX Live 2012. How can I make Listings ignore the ‘time’ keyword?

it is defined as an end keyword and can be deleted only with the (deprecated) deletendkeywords. Looks like a bug to me. However, you have to use the uppercase version of the keyword as it is defined in the language file.:

\documentclass{article}
\usepackage{listings}
\begin{document}
\begin{lstlisting}[keywordstyle=\textbf, language=SQL, deletendkeywords={TIME}]
create table Event (id integer primary key, time date);
\end{lstlisting}
\end{document}


• This was also true of the Python keyword filter; I had to use deletendkeywords={filter}. – tbekolay Sep 25 '13 at 15:50
• Ditto for Python keyword list. – Norswap Jan 28 at 15:13