bug-auctex
[Top][All Lists]
Advanced

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

[Bug-AUCTeX] Re: 2006-10-04; Filling `` \ %\nFoo''


From: Ralf Angeli
Subject: [Bug-AUCTeX] Re: 2006-10-04; Filling `` \ %\nFoo''
Date: Fri, 06 Oct 2006 19:02:24 +0200

* Reiner Steib (2006-10-05) writes:

> consider the following sample file:
>
> \documentclass{article}
> \begin{document}
> Dxx xxxxxxxx Lxxxxx xxxxxx.\ %
> Bxx xxxxxxxxx Axxxxxxx xxxxxxxx xxxxxxxxxx xxx xxxx Sxxxxxx"=Sxxxxxxx.
> \end{document}
>
> Put the cursor on the "B" and press `M-q', I get:
>
> \documentclass{article}
> \begin{document}
> Dxx xxxxxxxx Lxxxxx
> xxxxxx.\ % Bxx xxxxxxxxx Axxxxxxx xxxxxxxx xxxxxxxxxx xxx xxxx 
> Sxxxxxx"=Sxxxxxxx.
> \end{document}

The bug is caused by a regexp for detecting code comments in
`LaTeX-fill-region-as-paragraph' failing on "\ %".  The respective
function call is something like
(re-search-forward "[^ \t\r\n%\\]\\([ \t]\\|\\\\\\\\\\)*%" nil t)

I'd propose to change this to
(re-search-forward "[^\r\n%\\]\\([ \t]\\|\\\\\\\\\\)*%" nil t)
unless someone can come up with a false positive or negative for this
regexp when detecting code comments.

-- 
Ralf





reply via email to

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