[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] Listing and not listing regions inverted if `\begin{lstlist
From: |
Tassilo Horn |
Subject: |
Re: [AUCTeX] Listing and not listing regions inverted if `\begin{lstlisting}' not followed by what is expected |
Date: |
Mon, 23 Mar 2015 09:12:12 +0100 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) |
Denis Bitouzé <address@hidden> writes:
Hi Denis,
> (I must admit what I need is a kind of torture test from a syntax
> highlight point of view :)
Yes, nested verbatim environments is certainly not the scenario working
best. Basically, any \begin{X} where X is some verbatim environment
will enable verbatim fontification, and the next \end{Y} will disable it
again. But X and Y don't need to be the same, like in
\begin{latexcode} % enables verbativ fontification
\begin{lstlisting}
\end{lstlisting} % disables it again
\end{javacode}
AUCTeX font-latex uses syntactic fontification for verbatim blocks.
That kind of font-lock is usually used for comments or strings, i.e.,
all those things that usually don't nest.
Bye,
Tassilo