From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#193: Date: Tue, 6 Jul 2010 19:29:34 +0000 Message-ID: <20100706192934.GA3741__26101.2134877548$1278444606$gmane$org@muc.de> References: <4820D259.2060805@bbn.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1278444606 2969 80.91.229.12 (6 Jul 2010 19:30:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 6 Jul 2010 19:30:06 +0000 (UTC) Cc: 193@debbugs.gnu.org, emacs-devel@gnu.org To: Deniz Dogan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 06 21:30:05 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OWDqE-00019S-7W for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Jul 2010 21:30:02 +0200 Original-Received: from localhost ([127.0.0.1]:45400 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWDqD-0006qv-Hq for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Jul 2010 15:30:01 -0400 Original-Received: from [140.186.70.92] (port=47906 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWDq8-0006qU-LR for bug-gnu-emacs@gnu.org; Tue, 06 Jul 2010 15:29:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OWDq3-0005pE-M6 for bug-gnu-emacs@gnu.org; Tue, 06 Jul 2010 15:29:56 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40362) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWDq1-0005og-Hp; Tue, 06 Jul 2010 15:29:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OWDgZ-00039C-6h; Tue, 06 Jul 2010 15:20:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Tue, 06 Jul 2010 19:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 193 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 193-submit@debbugs.gnu.org id=B193.127844394412082 (code B ref 193); Tue, 06 Jul 2010 19:20:02 +0000 Original-Received: (at 193) by debbugs.gnu.org; 6 Jul 2010 19:19:04 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWDfc-00038p-HP for submit@debbugs.gnu.org; Tue, 06 Jul 2010 15:19:04 -0400 Original-Received: from colin.muc.de ([193.149.48.1] helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWDfa-00038T-Ch for 193@debbugs.gnu.org; Tue, 06 Jul 2010 15:19:03 -0400 Original-Received: (qmail 38923 invoked by uid 3782); 6 Jul 2010 19:18:57 -0000 Original-Received: from acm.muc.de (pD9E518D3.dip.t-dialin.net [217.229.24.211]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Tue, 06 Jul 2010 21:18:55 +0200 Original-Received: (qmail 4336 invoked by uid 1000); 6 Jul 2010 19:29:34 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 06 Jul 2010 15:20:03 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:38267 Archived-At: 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? A quick reminder of what the problem is. In C mode (NOT C++ mode): (i) Type M-q in a pair of short line comments like this // Two short // lines. The command ought to join them into a single line comment. Instead, it does nothing; (ii) Type M-q in a line comment which is longer than fill-column: // A long line comment, which is far far far longer than a moderately or very small fill-column. This miss-fills by splitting the line, but putting no comment marker on the new second line:. // A long line comment, which is far far far longer than a moderately or very small fill-column. These bugs are regressions between Emacs 21.4 and 22.1. ######################################################################### Both these bugs seem to be caused by a strange clause in `fill-paragraph', where what should be the fill-prefix ("// ") is made a component of `paragraph-start'. Thus (ii) every line in the comment sequence is automatically made into its own paragraph; and (i) when splitting lines, fill-paragraph doesn't insert the fill-prefix when this is also a paragraph starter. Here is the strange code: ;; Try to prevent code sections and comment sections from being ;; filled together. (when (and fill-paragraph-handle-comment comment-start-skip) (setq paragraph-start (concat paragraph-start "\\|[ \t]*\\(?:" comment-start-skip "\\)"))) In C Mode, `comment-start-skip' is "\\(//+\\|/\\*+\\)\\s *". The two bugs vanish when the above code is removed. Stefan, can you remember why you put this code in (revision 86672 of 2008-04-11)? Is there perhaps a way of achieving the same effect without making the fill-prefix match `paragraph-start'? > -- > Deniz Dogan -- Alan Mackenzie (Nuremberg, Germany).