* David Kastrup (2007-03-25) writes:

> Ralf Angeli <[EMAIL PROTECTED]> writes:
>
>> * Alexander Borovsky (2007-03-25) writes:
>>
>>> When I format verbatim enviroment, witch starts with square brackets,
>>> it's moves text for previous line. Simple example of problematic file:
[...]
>>> \begin{verbatim}
>>> [EMAIL PROTECTED] ~]$ cd ~/projects/
[...]
>> `LaTeX-backward-paragraph' fails to stop before the line with \begin
>> because the function `TeX-find-macro-end' assumes that the brackets
>> are an optional argument of the `begin' macro.  We could abort the
>> search for further arguments in `TeX-find-macro-end' as soon as a
>> verbatim construct is entered (to be checked by `LaTeX-verbatim-p'),
>> but this would add some overhead to macro boundary discovery.  Also,
>> this would just be a refinement of a heuristic.
[...]
> One possible remedy would be to retain any spacing before optional
> arguments when filling, assuming that the user had a good reason to
> put them in in the first place.

This still wouldn't help in the case at hand because due to the
boundaries of the macro being detected incorrectly point will end up
before \begin after `LaTeX-backward-paragraph' was executed and the
check for `LaTeX-indent-environment-list' will fail leading to the
environment contents being filled while they shouldn't.

-- 
Ralf


_______________________________________________
bug-auctex mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-auctex

Reply via email to