[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cperl-fill-paragraph broken
From: |
Stefan Monnier |
Subject: |
Re: cperl-fill-paragraph broken |
Date: |
31 Oct 2003 12:10:33 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
>>> auto-fill of comments in cperl doesn't work anymore. I think that
Stefan> Could you try and investigate when the bug appeared ?
Stefan>
Stefan> PS: Do you really mean auto-fill or only fill-paragraph ?
> I meant both. First I noticed that auto-fill doesn't work anymore and I
> thought that cperl-fill-paragraph would be the culprit.
It seems to me you don't mean both: auto-fill is a separate piece of code
that handles the `auto-fill-mode' thingy: filling text when the cursor goes
past the fill-column.
> Now I took a closer look and I'm sure that cperl-fill-paragraph doesn't work
> anymore due to changes to fill-paragraph.
> cperl-fill-paragraph prepares the comment a bit before handing it over to
> fill-paragraph.
> Back to the example I gave
> --- snip ---
> # this is a comment line in a buffer with cperl-mode that is supposed to be
> wrapped
> # around by auto-fill
> --- snip ---
> cperl-fill-paragraph modifies this to
> --- snip ---
> # this is a comment line in a buffer with cperl-mode that is supposed to be
> wrapped
> around by auto-fill
> --- snip ---
> and then expects fill-paragraph to do the rest.
> It looks as if someone has improved the CVS version to handle comments/code
> and I'm not surprised that it can't handle the example above. Neither with
> fill-paragraph-handle-comment set to t nor to nil. This is sort of
> a comment line + a non-comment line.
If set to nil, it should work 100% as before. Can you investigate or at
least give me some vague indication of when was the last time it worked?
> Maybe the preparation for filling that is done in cperl isn't needed anymore
> with the new fill-paragraph.
That's the goal, but inspection of cperl code is needed to figure out
whether the generic code is as good as the cperl code (it sadly
sounds unlikely).
> I changed the call to cperl-fill-paragraph in cperl-do-auto-fill to
> (fill-paragraph t) and auto-filling works fine (for the example).
You mean "filling" rather than "auto-filling".
Stefan