From rgm@gnu.org Sun Nov 9 13:22:41 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.0 required=4.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SUBJMONEY,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at quiet) by emacsbugs.donarmstrong.com; 9 Nov 2008 21:22:41 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mA9LMbI4029434 for ; Sun, 9 Nov 2008 13:22:39 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KzHgy-0000ZH-Jx for quiet@emacsbugs.donarmstrong.com; Sun, 09 Nov 2008 16:19:32 -0500 From: Karl Chen To: quiet@debbugs.gnu.org Subject: sh-mode indentation of "case $foo in (bar)" Date: Fri, 31 Oct 2008 03:29:13 -0700 Lines: 59 X-From-Line: emacs-devel-bounces+rgm=gnu.org@gnu.org Fri Oct 31 06:27:21 2008 Received: from mx10.gnu.org ([199.232.76.166]:35149) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KvrDt-0002rZ-37 for rgm@gnu.org; Fri, 31 Oct 2008 06:27:21 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KvrGd-0007oU-7P for rgm@gnu.org; Fri, 31 Oct 2008 06:30:12 -0400 Received: from lists.gnu.org ([199.232.76.165]:53794) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KvrGc-0007oC-Pf for rgm@gnu.org; Fri, 31 Oct 2008 06:30:10 -0400 Received: from localhost ([127.0.0.1]:46243 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KvrGc-0000SB-76 for rgm@gnu.org; Fri, 31 Oct 2008 06:30:10 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KvrFq-0000Re-Jw for emacs-devel@gnu.org; Fri, 31 Oct 2008 06:29:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KvrFo-0000QE-8A for emacs-devel@gnu.org; Fri, 31 Oct 2008 06:29:21 -0400 Received: from [199.232.76.173] (port=35277 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KvrFo-0000Q4-3g for emacs-devel@gnu.org; Fri, 31 Oct 2008 06:29:20 -0400 Received: from roar.cs.berkeley.edu ([128.32.36.242]:49603 helo=roar.quarl.org) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KvrFn-0007Uh-Mi for emacs-devel@gnu.org; Fri, 31 Oct 2008 06:29:19 -0400 Received: by roar.quarl.org (Postfix, from userid 18378) id E8CAA343E4; Fri, 31 Oct 2008 03:29:13 -0700 (PDT) X-Quack-Archive: 1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6? (barebone, rare!) 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: , Errors-To: emacs-devel-bounces+rgm=gnu.org@gnu.org X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Debbugs-No-Ack: yes Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: Glenn Morris [ resent from http://lists.gnu.org/archive/html/emacs-devel/2008-10/msg00906.html ] emacs -Q /tmp/case.sh # case x in y) y2 ;; (z) z2 ;; esac M-: (indent-region (point-min) (point-max)) Result: # case x in y) y2 ;; (z) z2 ;; esac Expected: # case x in y) y2 ;; (z) z2 ;; esac Running (sh-get-indent-info) on the y2 line includes sh-indent-for-case-alt in the result (as expected); running (sh-get-indent-info) on the z2 line doesn't yield sh-indent-for-case-alt. The "(altpattern)" syntax with leading opening parenthesis is supported by various shells (bash, ksh, zsh). Also, a second indentation bug: if the first line in the buffer is the case statement, sh-mode gets even more confused and double-indents the y2 line. This is rare though since usually the first line is "#!"; I only noticed it while constructing this bug report. Tested on emacs 22.2 and emacs 2008-10-31. From cyd@stupidchicken.com Sat Oct 24 14:16:47 2009 Received: (at 1320-done) by emacsbugs.donarmstrong.com; 24 Oct 2009 21:16:48 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: * X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=1.5 required=4.0 tests=AWL,SUBJMONEY autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from pantheon-po43.its.yale.edu (pantheon-po43.its.yale.edu [130.132.50.104]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9OLGkR1013959 for <1320-done@emacsbugs.donarmstrong.com>; Sat, 24 Oct 2009 14:16:47 -0700 Received: from furry (173-14-147-246-NewEngland.hfc.comcastbusiness.net [173.14.147.246]) (authenticated bits=0) by pantheon-po43.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id n9OLGdfh028764 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 24 Oct 2009 17:16:39 -0400 Received: by furry (Postfix, from userid 1000) id 7B0D4C070; Sat, 24 Oct 2009 17:16:39 -0400 (EDT) From: Chong Yidong To: Karl Chen Cc: 1320-done@debbugs.gnu.org Subject: Re: sh-mode indentation of "case $foo in (bar)" Date: Sat, 24 Oct 2009 17:16:39 -0400 Message-ID: <871vks332g.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) > # > case x in > y) > y2 > ;; > (z) > z2 > ;; > esac > > Running (sh-get-indent-info) on the y2 line includes > sh-indent-for-case-alt in the result (as expected); running > (sh-get-indent-info) on the z2 line doesn't yield > sh-indent-for-case-alt. Sorry for the late response. I've checked in a fix for this problem into Emacs CVS. From unknown Mon Aug 18 11:12:33 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 22 Nov 2009 15:24:11 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator