auctex-devel
[Top][All Lists]
Advanced

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

[AUCTeX-devel] Filling of code comments


From: Ralf Angeli
Subject: [AUCTeX-devel] Filling of code comments
Date: Thu, 28 Jul 2005 13:23:42 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

As noted in <URL:http://article.gmane.org/gmane.emacs.auctex.bugs/252>
there currently is a glitch with filling of code comments.

Code comments receive special treatment in paragraph filling.  If you
call `LaTeX-fill-paragraph' on a line with a code comment, not the
whole paragraph but only the line with the code comment will be
filled.  I think this functionality should be removed from
`LaTeX-fill-paragraph'.  The consequence will be that even if `M-q' is
typed on a line with a code comment, the whole paragraph will be
filled and the code comment be treated as code comments encountered at
arbitrary places in a paragraph are treated now.

What we currently do with them if they don't fit into a line, is adding
a linebreak just before the last non-comment word.  That means a
paragraph like

text text text text text text text text text text text text text text
text text text text text text text text text text text % comment comment comment
text text text text text text text text text text text text text text

will become

text text text text text text text text text text text text text text
text text text text text text text text text text
text % comment comment comment
text text text text text text text text text text text text text text

In contrast to the comment in `LaTeX-fill-region-as-para-do', we now
could generate something like

text text text text text text text text text text text text text text
text text text text text text text text text text text % comment comment
                                                       % comment
text text text text text text text text text text text text text text

But that would mean filling a paragraph may result in it becoming two
separate paragraphs which might be problematic.

So my suggestion would be to leave the treatment of code comments as
is and make the functionality of filling code comments available in a
separate function which may be called interactively.

Does this sound reasonable?

-- 
Ralf





reply via email to

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