From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "William Xue" Newsgroups: gmane.emacs.devel Subject: Re: redundant space after run 'c-indent-new-comment-line' Date: Thu, 15 Feb 2007 09:51:07 +0800 Organization: wv Message-ID: References: <20070214234925.GA1024@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1171504283 9160 80.91.229.12 (15 Feb 2007 01:51:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Feb 2007 01:51:23 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Alan Mackenzie" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 15 02:51:15 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 1HHVmF-0006PS-Gn for ged-emacs-devel@m.gmane.org; Thu, 15 Feb 2007 02:51:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HHVmE-0008EW-SU for ged-emacs-devel@m.gmane.org; Wed, 14 Feb 2007 20:51:14 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HHVm2-0008ER-Nn for emacs-devel@gnu.org; Wed, 14 Feb 2007 20:51:02 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HHVm0-0008EF-9O for emacs-devel@gnu.org; Wed, 14 Feb 2007 20:51:01 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HHVm0-0008EC-3U for emacs-devel@gnu.org; Wed, 14 Feb 2007 20:51:00 -0500 Original-Received: from nz-out-0506.google.com ([64.233.162.238]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HHVlz-00070n-PF for emacs-devel@gnu.org; Wed, 14 Feb 2007 20:50:59 -0500 Original-Received: by nz-out-0506.google.com with SMTP id s1so363219nze for ; Wed, 14 Feb 2007 17:50:59 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:to:subject:from:organization:cc:content-type:mime-version:references:content-transfer-encoding:message-id:in-reply-to:user-agent; b=SMHolRzyPtSbgVSgBevmRm+wnZK2nsKkhUsbfYRktGVtEg06Bv7y8f+u9buxy0cmfaEPKmmQswM0VGmhDhpqmXBiQksJUWLbb16PXKqQeXZm/ist41esLNc0umS8qeC6wjY8CCEDcqVx7TcN3eQAYtf9DL0oT755mq2ZPuiihY4= Original-Received: by 10.35.18.18 with SMTP id v18mr2105286pyi.1171504258963; Wed, 14 Feb 2007 17:50:58 -0800 (PST) Original-Received: from williamnb ( [58.33.96.191]) by mx.google.com with ESMTP id 7sm2019050nzo.2007.02.14.17.50.57; Wed, 14 Feb 2007 17:50:58 -0800 (PST) In-Reply-To: <20070214234925.GA1024@muc.de> User-Agent: Opera Mail/9.20 (Win32) X-detected-kernel: Linux 2.4-2.6 (Google crawlbot) 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:66407 Archived-At: On Thu, 15 Feb 2007 06:34:40 +0800, Alan Mackenzie wrote: > 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 Yes, that is what I want. > > 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. Thank you! > >> Thanks! > > Thank you! > >> -- >> Sincerely yours, >> William > -- Sincerely yours, William