Subject: Fix for bug#193.

From: Alan Mackenzie <[email-masked]>
Date: Fri, 9 Jul 2010 18:51:16 +0000

Hi, Deniz,

On Sun, Jun 27, 2010 at 02:47:52PM +0200, Deniz Dogan wrote:
> Did anyone ever agree on what needs to be done to fix the problem?

Would you try this patch, please, and then tell me whether or not it
works fully.  Thanks!

*** orig/cc-cmds.el	2010-07-05 20:17:46.000000000 +0000
--- cc-cmds.el	2010-07-09 18:31:52.143059496 +0000
***************
*** 4229,4236 ****
    (let ((fill-paragraph-function
  	 ;; Avoid infinite recursion.
  	 (if (not (eq fill-paragraph-function 'c-fill-paragraph))
! 	     fill-paragraph-function)))
!     (c-mask-paragraph t nil 'fill-paragraph arg))
    ;; Always return t.  This has the effect that if filling isn't done
    ;; above, it isn't done at all, and it's therefore effectively
    ;; disabled in normal code.
--- 4229,4239 ----
    (let ((fill-paragraph-function
  	 ;; Avoid infinite recursion.
  	 (if (not (eq fill-paragraph-function 'c-fill-paragraph))
! 	     fill-paragraph-function))
! 	(start-point (point-marker)))
!     (c-mask-paragraph
!      t nil (lambda () (fill-region-as-paragraph (point-min) (point-max) arg)))
!     (goto-char start-point))
    ;; Always return t.  This has the effect that if filling isn't done
    ;; above, it isn't done at all, and it's therefore effectively
    ;; disabled in normal code.

> Deniz Dogan

-- 
Alan Mackenzie (Nuremberg, Germany).