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: [Toby.Allsopp@navman.com: auto-fill in c-mode messes up incomplete comments] Date: 2 Jan 2007 22:09:17 +0100 Message-ID: <20070102222055.GA2006@muc.de> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1167772179 14495 80.91.229.12 (2 Jan 2007 21:09:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 2 Jan 2007 21:09:39 +0000 (UTC) Cc: bug-cc-mode@gnu.org, monnier@IRO.UMontreal.CA, =?iso-8859-1?Q?Micha=EBl?= Cadilhac , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 02 22:09:36 2007 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.50) id 1H1qt5-0005My-OG for ged-emacs-devel@m.gmane.org; Tue, 02 Jan 2007 22:09:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1qt4-0007wC-Fg for ged-emacs-devel@m.gmane.org; Tue, 02 Jan 2007 16:09:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H1qsr-0007w7-6V for emacs-devel@gnu.org; Tue, 02 Jan 2007 16:09:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H1qsq-0007vV-Hh for emacs-devel@gnu.org; Tue, 02 Jan 2007 16:09:20 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1qsq-0007vR-EQ for emacs-devel@gnu.org; Tue, 02 Jan 2007 16:09:20 -0500 Original-Received: from [193.149.48.1] (helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H1qsp-0002oy-PH for emacs-devel@gnu.org; Tue, 02 Jan 2007 16:09:20 -0500 Original-Received: (qmail 83525 invoked by uid 3782); 2 Jan 2007 21:09:17 -0000 Original-Received: from acm.muc.de (p54A3D358.dip.t-dialin.net [84.163.211.88]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Tue, 02 Jan 2007 22:09:14 +0100 Original-Received: (qmail 3945 invoked by uid 1000); 2 Jan 2007 22:20:55 -0000 Original-Date: Tue, 2 Jan 2007 22:20:55 +0000 Original-To: Toby Allsopp , Richard Stallman 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: 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:64646 Archived-At: Hi, Toby, Hi Richard! On Sun, Dec 24, 2006 at 07:43:02PM -0500, Richard Stallman wrote: > Would someone please work on this? I've just submitted a fix in cc-cmds.el. Toby, would you please update your cc-cmds.el, and see if my fix actually is a fix. Thanks in Advance! > ------- Start of forwarded message ------- > To: emacs-pretest-bug@gnu.org > From: Toby Allsopp > Date: Tue, 28 Nov 2006 11:48:39 +1300 > MIME-Version: 1.0 > Content-Type: text/plain; charset=us-ascii > Cc: emacs-snapshot@packages.debian.org > Subject: auto-fill in c-mode messes up incomplete comments > X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO > autolearn=failed version=3.0.4 > >>>From a shell prompt: > emacs -q /tmp/tmp.c > M-x auto-fill-mode > /* > * > (That's / * * SPC). > When typing the final space, the second line gets deleted. Pressing > return instead messes it up differently. This seems to be a problem > with c-mask-paragraph. Absolutely spot on! I'd subtracted 2 from the position after "*/", without actually testing that the "*/" was present. I think I've got it right, now. I'm not quite sure what you meant by the following, though. Can you let me know whether or not it works now, please. > After space: > - --8<---------------cut here---------------start------------->8--- > /* > - --8<---------------cut here---------------end--------------->8--- > After return: > - --8<---------------cut here---------------start------------->8--- > / > ** > - --8<---------------cut here---------------end--------------->8--- -- Alan Mackenzie (Ittersbach, Germany)