From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#2141: C mode indentation problem Date: Sat, 21 Feb 2009 16:35:17 +0000 Message-ID: <20090221163517.GA3027@muc.de> References: Reply-To: Alan Mackenzie , 2141@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1235233444 14148 80.91.229.12 (21 Feb 2009 16:24:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Feb 2009 16:24:04 +0000 (UTC) Cc: bug-emacs@gnu.org To: Reuben Thomas , 2141@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 21 17:25:18 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LaufE-0006Wx-FF for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Feb 2009 17:25:16 +0100 Original-Received: from localhost ([127.0.0.1]:42964 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Laudu-0007v3-0S for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Feb 2009 11:23:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Laudg-0007nx-Tc for bug-gnu-emacs@gnu.org; Sat, 21 Feb 2009 11:23:40 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Laudf-0007lj-Ff for bug-gnu-emacs@gnu.org; Sat, 21 Feb 2009 11:23:40 -0500 Original-Received: from [199.232.76.173] (port=56196 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Laudf-0007lZ-Bv for bug-gnu-emacs@gnu.org; Sat, 21 Feb 2009 11:23:39 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:42061) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Laude-0008OZ-NX for bug-gnu-emacs@gnu.org; Sat, 21 Feb 2009 11:23:39 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1LGNaWG017175; Sat, 21 Feb 2009 08:23:37 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n1LGK3BN016116; Sat, 21 Feb 2009 08:20:03 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Alan Mackenzie Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs , owner@emacsbugs.donarmstrong.com Resent-Date: Sat, 21 Feb 2009 16:20:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 2141 X-Emacs-PR-Package: emacs,cc-mode X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123523283714758 (code B ref -1); Sat, 21 Feb 2009 16:20:03 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 21 Feb 2009 16:13:57 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1LGDoZD014752 for ; Sat, 21 Feb 2009 08:13:51 -0800 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LauU9-0003H3-VX for bug-gnu-emacs@gnu.org; Sat, 21 Feb 2009 11:13:50 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LauU8-0003FH-CL for bug-gnu-emacs@gnu.org; Sat, 21 Feb 2009 11:13:49 -0500 Original-Received: from [199.232.76.173] (port=38741 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LauU7-0003F9-VB for bug-gnu-emacs@gnu.org; Sat, 21 Feb 2009 11:13:48 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:43695) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LauU7-00063F-Ot for bug-gnu-emacs@gnu.org; Sat, 21 Feb 2009 11:13:47 -0500 Original-Received: from mail.gnu.org ([199.232.76.166]:41347 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LauS0-00085b-UZ for bug-emacs@gnu.org; Sat, 21 Feb 2009 11:11:37 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LauU5-00062n-Al for bug-emacs@gnu.org; Sat, 21 Feb 2009 11:13:46 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:1219 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 1LauU4-000621-RM for bug-emacs@gnu.org; Sat, 21 Feb 2009 11:13:45 -0500 Original-Received: (qmail 10585 invoked by uid 3782); 21 Feb 2009 16:13:40 -0000 Original-Received: from acm.muc.de (pD9E52826.dip.t-dialin.net [217.229.40.38]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Sat, 21 Feb 2009 17:13:38 +0100 Original-Received: (qmail 10269 invoked by uid 1000); 21 Feb 2009 16:35:17 -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 monty-python.gnu.org: FreeBSD 4.6-4.9 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sat, 21 Feb 2009 11:23:40 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:25554 Archived-At: Hi, Reuben! On Sun, Feb 01, 2009 at 07:38:54PM +0000, Reuben Thomas wrote: > Running Emacs from CVS head as "./emacs -Q foo.c" to create a new > buffer foo.c in C mode, if I enter the following text, indenting as I > go: > ----cut here---- > int main (void) > { > int foo; > > switch (foo) > { > case BLAH | 'a': > bar = 0; > break; > ---cut here---- > it is indented as above, which I believe is wrong, as the "break" > should be indented to the same column as the previous line. If I change > the case line to simply "case BLAH:" then this does indeed happen. It should be fixed now in the CVS at savannah. CC Mode was lacking code to parse (compile-time) expressions as case labels. -- Alan Mackenzie (Nuremberg, Germany).