From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: bug#193: Date: Tue, 6 Jul 2010 19:29:34 +0000 Message-ID: <20100706192934.GA3741@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 1278443952 422 80.91.229.12 (6 Jul 2010 19:19:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 6 Jul 2010 19:19:12 +0000 (UTC) Cc: 193@debbugs.gnu.org, Stefan Monnier , emacs-devel@gnu.org To: Deniz Dogan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 06 21:19:08 2010 Return-path: Envelope-to: ged-emacs-devel@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 1OWDff-0002AB-FJ for ged-emacs-devel@m.gmane.org; Tue, 06 Jul 2010 21:19:07 +0200 Original-Received: from localhost ([127.0.0.1]:54141 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWDfe-0002PI-Jo for ged-emacs-devel@m.gmane.org; Tue, 06 Jul 2010 15:19:06 -0400 Original-Received: from [140.186.70.92] (port=42508 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWDfZ-0002Ov-OY for emacs-devel@gnu.org; Tue, 06 Jul 2010 15:19:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OWDfX-0004Ej-Gd for emacs-devel@gnu.org; Tue, 06 Jul 2010 15:19:01 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:4786 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWDfX-0004EV-6u for emacs-devel@gnu.org; Tue, 06 Jul 2010 15:18:59 -0400 Original-Received: (qmail 38894 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-detected-operating-system: by eggs.gnu.org: FreeBSD 4.6-4.9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:126849 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).