[Top][All Lists]

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

Re: [AUCTeX] fill-paragraph and fold mode

From: Levon Saldamli
Subject: Re: [AUCTeX] fill-paragraph and fold mode
Date: Wed, 11 May 2005 16:03:41 +0200
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

I think that's correct. The problem is in lstlisting in my case. And yes,
correct indentation seems to solve the problem.

But I think one problem is if one wants to put e.g. lstlisting in a figure. 
Then it's
natural to indent the \begin{}-\end{} pair. Although the contents will probably 
extra indentation, so it is still a problem. But the wrong fontifying is 
in this case.

Best regards,

Ralf Angeli wrote:
[Redirecting to the mailing list.]

* Levon Saldamli (2005-05-11) writes:

Actually, it's not that annoying. I just thought it should be

What is more annoying is that fontifying sometimes misses the end of
an environment, and fontifies large parts of the text wrongly. I
think its something about indentation, i.e. it seems to depend on
indentation instead of just checking \end{...}

Should I report that as a separate bug?

Sounds like verbatim and verbatim-like environments.  AFAIK at least
\end{verbatim} must not have indentation as otherwise there will
appear an empty line in the output file after the verbatim
environment.  That's why the verbatim environment is indented to
column 0.  And font locking gives a hint that something is wrong.

The mechanisms behind that is used for verbatim-like environments like
lstlisting as well, although they do not require to be indented to
column 0.  I think inhibiting indentation is useful nevertheless
because you don't have to fiddle with lstlisting's gobble option.  But
maybe font locking should be a bit more liberal and not enforce this
indentation.  Of course, the warning function in case of the verbatim
environment would be sacrificed if this was implemented.

I tend to change font locking.  What do others think?

Uh, if my guess about verbatim environments was wrong, feel free to
report a separate bug.

reply via email to

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