Hi Tassilo,

Le 23/03/15 à 09h12, Tassilo Horn <t...@gnu.org> a écrit :

> 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.

OK but, if `latexcode' is not declared as a verbatim environment, only
`lstlisting' is considered as such in:

  ┌────
  │ \begin{latexcode}
  │ \begin{lstlisting}+\only<2->{+[+\emph{options}+]+}+
  │ +\emph{listing}+
  │ \end{lstlisting}
  │ \end{latexcode}
  └────

and what is strange is that, because of the non expected `+' in:

  ┌────
  │ \begin{lstlisting}+\only<2->{+[+\emph{options}+]+}+
  └────

the beginning of this environment is missed (okay) /but/ that's the
following `\end{lstlisting}' which is considered as the /beginning/ of
this environment.

Wouldn't it be possible for `\end{...}' to never be considered as the
/beginning/ of `...' environment?

Meanwhile, is it possible to stop a listing region highlight with some
(magic) comments?

Thanks!
-- 
Denis

_______________________________________________
auctex mailing list
auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex

Reply via email to