From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#9190: 24.0.50; wrong indentation in shell mode with main function Date: Tue, 02 Aug 2011 22:00:53 -0400 Message-ID: References: <878vria3t7.fsf@googlemail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1312336900 23215 80.91.229.12 (3 Aug 2011 02:01:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 3 Aug 2011 02:01:40 +0000 (UTC) Cc: 9190-done@debbugs.gnu.org To: ivan.kanis@googlemail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 03 04:01:36 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QoQm8-0006l4-Bs for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Aug 2011 04:01:36 +0200 Original-Received: from localhost ([::1]:53184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoQm7-0005jV-HG for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Aug 2011 22:01:35 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:58291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoQm4-0005jP-QN for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2011 22:01:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QoQm3-0003H9-RG for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2011 22:01:32 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50537) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoQm3-0003H3-MQ for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2011 22:01:31 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QoQmY-0003Jx-7b for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2011 22:02:02 -0400 Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Aug 2011 02:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 9190 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 9190@debbugs.gnu.org, monnier@iro.umontreal.ca Original-Received: via spool by 9190-done@debbugs.gnu.org id=D9190.131233690712743 (code D ref 9190); Wed, 03 Aug 2011 02:02:01 +0000 Original-Received: (at 9190-done) by debbugs.gnu.org; 3 Aug 2011 02:01:47 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QoQmI-0003JT-JK for submit@debbugs.gnu.org; Tue, 02 Aug 2011 22:01:46 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QoQmG-0003JM-CX for 9190-done@debbugs.gnu.org; Tue, 02 Aug 2011 22:01:44 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArgHAHirOE5FxKfe/2dsb2JhbABCmEiPEHiBQAEBBAFWIwULCzQSFBgNiCO+XIZCBJ9KhDE X-IronPort-AV: E=Sophos;i="4.67,307,1309752000"; d="scan'208";a="128497588" Original-Received: from 69-196-167-222.dsl.teksavvy.com (HELO ceviche.home) ([69.196.167.222]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 02 Aug 2011 22:00:53 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 4C5D7660CF; Tue, 2 Aug 2011 22:00:53 -0400 (EDT) In-Reply-To: <878vria3t7.fsf@googlemail.com> (ivan kanis's message of "Thu, 28 Jul 2011 16:16:20 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 02 Aug 2011 22:02:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:49864 Archived-At: > 2) paste the following > main () { > } > 3) press tab on the last line > The curly bracket is indented wrong: > main () { > } > The curly bracket is incorrectly indented. It happens to any function > ending in main. Reproducible on emacs 23.3 and bzr. Indeed, it's the case for any function ending in "in". I've installed the patch below which should fix the problem, Stefan --- lisp/progmodes/sh-script.el 2011-04-22 18:44:26 +0000 +++ lisp/progmodes/sh-script.el 2011-08-03 01:54:12 +0000 @@ -1066,7 +1066,7 @@ ;; a normal command rather than the real `in' keyword. ;; I.e. we should look back to try and find the ;; corresponding `case'. - (and (looking-at ";[;&]\\|in") + (and (looking-at ";[;&]\\|\\_