[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: regression: filling comments in C++ code (today's CVS)
From: |
Stefan Monnier |
Subject: |
Re: regression: filling comments in C++ code (today's CVS) |
Date: |
Mon, 20 Jan 2003 11:54:13 -0500 |
> > Why on earth does cc-mode rebind M-q instead of setting
> > fill-paragraph-function ?
>
> Because c-fill-paragraph doesn't do the actual filling. It masks the
> comment or string the point is within and calls the normal fill
> function to make the appropriate adaptive filling etc. For this to
> work it must run first, before any other code has tried to do things
> like calculate the fill prefix and thereby clobbered its true value.
But that's what fill-paragraph does.
It first calls fill-paragraph-function.
> Specifically, the filladapt package replaces fill-paragraph with its
> own variant that calculates the adaptive fill prefix before calling
> fill-paragraph-function. CC Mode must do the comment masking before
> that to make it adapt to the proper prefix.
Ah, so it's because filladapt does not faithfully implement the
fill-paragraph interface.
For the sake of correctness in cases other than filladapt, how about
setting fill-paragraph-function (while still keeping the rebinding
of M-q) so that calling fill-paragraph DTRT.
Stefan
Re: regression: filling comments in C++ code (today's CVS), Stefan Monnier, 2003/01/18