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: redundant space after run 'c-indent-new-comment-line' Date: 14 Feb 2007 23:34:39 +0100 Message-ID: <20070214234925.GA1024@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 1171492524 25934 80.91.229.12 (14 Feb 2007 22:35:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 14 Feb 2007 22:35:24 +0000 (UTC) Cc: emacs-devel@gnu.org To: William Xue Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 14 23:35:01 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 1HHSiJ-0004Na-L6 for ged-emacs-devel@m.gmane.org; Wed, 14 Feb 2007 23:34:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HHSiJ-0006Uj-6E for ged-emacs-devel@m.gmane.org; Wed, 14 Feb 2007 17:34:59 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HHSiA-0006Ub-16 for emacs-devel@gnu.org; Wed, 14 Feb 2007 17:34:50 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HHSi5-0006UC-Gq for emacs-devel@gnu.org; Wed, 14 Feb 2007 17:34:49 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HHSi5-0006U6-A1 for emacs-devel@gnu.org; Wed, 14 Feb 2007 17:34:45 -0500 Original-Received: from colin.muc.de ([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 1HHSi4-0006LA-Pk for emacs-devel@gnu.org; Wed, 14 Feb 2007 17:34:45 -0500 Original-Received: (qmail 76525 invoked by uid 3782); 14 Feb 2007 22:34:39 -0000 Original-Received: from acm.muc.de (p54A3D30C.dip.t-dialin.net [84.163.211.12]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Wed, 14 Feb 2007 23:34:38 +0100 Original-Received: (qmail 1913 invoked by uid 1000); 14 Feb 2007 23:49:25 -0000 Original-Date: Wed, 14 Feb 2007 23:49:25 +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-kernel: 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:66405 Archived-At: Hi, William! On Wed, Feb 14, 2007 at 03:24:54PM +0800, William Xue wrote: > First, 'M-;' make a c style comment in a new line in a .h file, it prints > '/* */', and the cursor blinks at the 2nd space char. Yes. This is the place where you'll be wanting to start typing. > Then, 'M-J' to run 'c-indent-new-comment-line', and it gives > '/* > * */' and the cursor blinks at the last '*', but I think it should be > blinks at the 2nd space in the second line. More precisely, you get this (but not in gnu style - use C-. k&r first to see this): /* * */ ^ | point What you are saying, it I understand you correctly, is that you should see this: /* * */ ^ | point I agree with you. It's a bug. > Please point out if I am wrong or have missed something. c-indent-new-comment-line is a rat's nest of special cases. Invoking it when there's no text inside the "/* */" needs special handling. I'll fix it. > Thanks! Thank you! > -- > Sincerely yours, > William -- Alan Mackenzie (Ittersbach, Germany).