I happen to use as a variable the word distance within my R code and I notice that it is always being treated as some kind of keyword. I saw in How can I delete non-letter keywords (such as '<-')? that there are options available (the three commented out lines below in the MWE) but no matter which I choose he word distance remains blue. So what is this word distance? How can I get at it?
\documentclass{article}
\usepackage{xcolor}
\usepackage{listings}
\lstset{
language=R,
% keywords={},
% otherkeywords={},
% deletekeywords={distance},
keywordstyle=\color{blue},
}
\lstnewenvironment{R}{\lstset{language=R}}{}
\begin{document}
\begin{R}
distance <- 1:10
\end{R}
\end{document}