help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: fill-paragraph / fill region in latex (auctex) buffer


From: Stefan Monnier
Subject: Re: fill-paragraph / fill region in latex (auctex) buffer
Date: Thu, 24 Nov 2005 23:20:32 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> instead of the simple `fill-region-as-paragraph' call (in the else
> part of the above form) currently in `fill-region' and making `end' a
> marker.  But it would probably make more sense to make
> `fill-region-as-paragraph' aware of comments.

I don't think so: fill-region-as-paragraph is really the function that fills
"one paragraph".  So to handle comments, the most important part is to
change fill-region so as to recognize that blocks of comments are paragraphs
on their own.  I.e. it's the forward-paragraph and backward-paragraph
functionality that needs to be made aware of comments (and strings,
incidentally).  Tho I'm unsure about the M-{ and M-} part: fill.el should
maybe have its notion of paragraphs.

> So for the problem at hand the OP should simply use the functions
> provided by AUCTeX instead of `fill-region'.  Of course it would be
> nice if the specialized function(s) could be hooked into `fill-region'
> because then the menu entry `Edit --> Fill' would work as well.

I'd rather add something like fill-paragraph-forward-function should could
then be used both by fill-region and by fill-paragraph.


        Stefan


reply via email to

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