From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.cc-mode.general,gmane.emacs.devel Subject: Re: C++-mode, wrong indentation Date: Mon, 14 Jul 2008 13:44:06 +0000 Message-ID: <20080714134406.GD3445@muc.de> References: <42b562540807012159jc4c246bg1fcbe8e9e2ea2ac6@mail.gmail.com> <20080702095731.GA2594@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1216041532 12658 80.91.229.12 (14 Jul 2008 13:18:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Jul 2008 13:18:52 +0000 (UTC) Cc: bug-cc-mode@gnu.org, emacs-devel@gnu.org To: Kevin Yu Original-X-From: cc-mode-help-bounces@lists.sourceforge.net Mon Jul 14 15:19:39 2008 Return-path: Envelope-to: sf-cc-mode-help@m.gmane.org Original-Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by lo.gmane.org with esmtp (Exim 4.50) id 1KINxj-00019B-CI for sf-cc-mode-help@m.gmane.org; Mon, 14 Jul 2008 15:19:31 +0200 Original-Received: from sc8-sf-list1-new.sourceforge.net (sc8-sf-list1-new-b.sourceforge.net [10.3.1.93]) by sc8-sf-spam2.sourceforge.net (Postfix) with ESMTP id 14F2312D5B; Mon, 14 Jul 2008 06:18:37 -0700 (PDT) Original-Received: from sc8-sf-mx2-b.sourceforge.net ([10.3.1.92] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1KINwp-0007sI-Or for cc-mode-help@lists.sourceforge.net; Mon, 14 Jul 2008 06:18:35 -0700 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by mail.sourceforge.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.44) id 1KINwo-0002Wj-Cx for cc-mode-help@lists.sourceforge.net; Mon, 14 Jul 2008 06:18:35 -0700 Original-Received: from mail.gnu.org ([199.232.76.166]:39590 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KINwD-0004bs-SD for bug-cc-mode@gnu.org; Mon, 14 Jul 2008 09:17:57 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KINwg-0003P5-Ho for bug-cc-mode@gnu.org; Mon, 14 Jul 2008 09:18:30 -0400 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on monty-python X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=SPF_PASS autolearn=failed version=3.1.0 Original-Received: from colin.muc.de ([193.149.48.1]:2855 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KINwg-0003Ob-19 for bug-cc-mode@gnu.org; Mon, 14 Jul 2008 09:18:26 -0400 Original-Received: (qmail 15786 invoked by uid 3782); 14 Jul 2008 13:18:22 -0000 Original-Received: from acm.muc.de (pD9E53A92.dip.t-dialin.net [217.229.58.146]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Mon, 14 Jul 2008 15:18:19 +0200 Original-Received: (qmail 5624 invoked by uid 1000); 14 Jul 2008 13:44:06 -0000 Content-Disposition: inline In-Reply-To: <20080702095731.GA2594@muc.de> User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.6-4.9 X-Spam-Score: 1.0 (+) X-Spam-Report: Spam Filtering performed by sourceforge.net. See http://spamassassin.org/tag/ for more details. Report problems to http://sf.net/tracker/?func=add&group_id=1&atid=200001 1.0 FORGED_RCVD_HELO Received: contains a forged HELO X-BeenThere: cc-mode-help@lists.sourceforge.net X-Mailman-Version: 2.1.8 Precedence: list List-Id: "Bug reports, feature requests, and general talk about CC Mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: cc-mode-help-bounces@lists.sourceforge.net Errors-To: cc-mode-help-bounces@lists.sourceforge.net Xref: news.gmane.org gmane.emacs.cc-mode.general:5214 gmane.emacs.devel:100681 Archived-At: Hello again, Kevin! On Wed, Jul 02, 2008 at 09:57:31AM +0000, Alan Mackenzie wrote: > Hi, Kevin! > On Wed, Jul 02, 2008 at 12:59:36PM +0800, Kevin Yu wrote: > > Hi, > > ====code==== > > if (x < 0 || y < 0 || x >= 9) { > > // c++-mode will indent this line with > > 2*c-basic-offset when editing. > > } // and this line with c-basic-offset > > ====code==== > > If you copy the above code into a c++-mode buffer, the indentation is > > right. But when you reenter the ">=" of first line, the indentation > > goes wrong again. > Yes. This is a bug. [ .... ] > I can probably fix this quite easily. Correction: I can probably fix this. ;-( It's a bit trickier than I thought it would be. I'm working on it. -- Alan Mackenzie (Nuremberg, Germany). ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08