[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: Martin Stjernholm
Subject: Re: regression: filling comments in C++ code (today's CVS)
Date: 19 Jan 2003 20:42:16 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

"Stefan Monnier" <monnier+gnu/address@hidden> wrote:

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

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.

reply via email to

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