I am using the lstlisting package in LaTeX mode. Sometimes I have a $ symbol inside the code. Emacs sees this as the beginning of the formula. And the rest of the document becomes ugly:

In verbatim mode, it correctly displays special characters:

How to make it render lslisting as verbatim?
source share