emacs-devel
[Top][All Lists]
Advanced

[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: Fri, 17 Jan 2003 12:19:24 -0500

> >> I just updated from CVS today and it appears there has been a
> >> rather serious regression with respect to filling comments in C++
> >> code.
> >> 
> >> Here's a test case, in cc-mode:
> >> 
> >> main()
> >> {
> >>     // a[M-q]
> >> 
> >> comes back with:
> >> 
> >> fill-comment-paragraph: Search failed: "/\\*+ *\\|//+ *"
> >
> >Could you provide the full backtrace (by setting
> >Options => Enter Debugger on Error) ?
> 
> I guess a _15 character_ test case is too much work to cut/paste? :)

The difference is between "a few seconds for each bug reporter"
and "a few seconds * N bug reports for each maintainer".  We don't
have too much maintainer-time in our hands.

> Here 'tis:
> 
> Debugger entered--Lisp error: (search-failed "/\\*+ *\\|//+ *")
>   re-search-forward("/\\*+ *\\|//+ *")
>   fill-comment-paragraph(nil)
>   fill-paragraph(nil)
>   apply(fill-paragraph nil)
>   c-mask-comment(t nil fill-paragraph nil)
>   c-fill-paragraph(nil)
>   call-interactively(c-fill-paragraph)

Why on earth does cc-mode rebind M-q instead of setting
fill-paragraph-function ?

Anyway, it's obviously a problem in my new filling code.
I'll take a look at it, but in the mean time, rebinding
M-q to fill-paragraph (in c-common-mode-hook I guess)
and setting fill-paragraph-function to `c-fill-paragraph'
should hide the problem.


        Stefan





reply via email to

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