[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] Re: Unfillable paragraph with AUCTeX 11.86

From: Ralf Angeli
Subject: Re: [AUCTeX] Re: Unfillable paragraph with AUCTeX 11.86
Date: Sun, 21 Nov 2010 16:40:36 +0100

* Tassilo Horn (2010-11-17) writes:

> Oh, yeah, that function must be buggy.  Here's a text snippet I used for
> testing:
> --8<---------------cut here---------------start------------->8---
> As discussed in the previous section, a concrete transformation extends the
> \textsf{Transformation} class, and inside its
> \lstinline{transform()} method, it instantiates and executes the elementary 
> operations provided by the
> --8<---------------cut here---------------end--------------->8---
> If I set point to column zero of the third line (before
> \lstinline{transform()}) and then do
>   M-: (goto-char (TeX-find-macro-end-helper (point)))
> point is moved to the closing brace finishing the lstlisting's caption.
> That's what `TeX-find-closing-brace' (or indirectly
> `TeX-find-balanced-brace') returns.  When I do that in this message
> buffer, it works just fine...

In the LaTeX buffer `scan-lists' gets confused because font-latex gave
the opening and closing braces of the \lstinline macro a string syntax.
(This happens in `font-latex-set-syntactic-keywords'.)  You can check
the syntax if you put point in front of one of the braces, then call
`M-: (syntax-class (syntax-after (point))) <RET>' and look up the result
in the table in (info "(elisp)Syntax Table Internals").

Note that the problem goes away if you disable font locking or if you
prevent AUCTeX's listings style file from being loaded.

At the moment I'm not sure yet how to fix this.  Perhaps putting the
syntax property on the characters after the opening and before the
closing brace would help.  But I'll have to check if this is the right
thing to do.

The whole verbatim handling in AUCTeX is a bit fragile.  Perhaps at some
point we should really switch to something like a parse tree as
suggested by somebody on the auctex-devel list.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]