emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: cperl-fill-paragraph broken


From: Klaus Zeitler
Subject: Re: cperl-fill-paragraph broken
Date: 31 Oct 2003 09:25:01 +0100

    Stefan> 
    >> 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.
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.

Maybe the preparation for filling that is done in cperl isn't needed anymore
with the new fill-paragraph.
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).

Maybe one could just remove now all the cperl-fill stuff (that would be my
goal), but this needs a bit more testing. But then again there may be more
reasons than fill-paragraph why Ilya had filling wrapped with his own code.

Klaus

-- 
 ------------------------------------------
|  Klaus Zeitler      Lucent Technologies  |
|  Email:             address@hidden  |
 ------------------------------------------
---
If I could drop dead right now, I'd be the
happiest man alive!      -- Samuel Goldwyn




reply via email to

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