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#15613: Wrong indentation in Shell-script[sh] mode? Date: Tue, 15 Oct 2013 10:37:44 -0400 Message-ID: References: <525C59B0.7090804@alice.it> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT X-Trace: ger.gmane.org 1381847916 8942 80.91.229.3 (15 Oct 2013 14:38:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Oct 2013 14:38:36 +0000 (UTC) Cc: 15613@debbugs.gnu.org To: Angelo Graziosi Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 15 16:38:39 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VW5lb-0002fS-IF for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Oct 2013 16:38:35 +0200 Original-Received: from localhost ([::1]:42217 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VW5lb-0007qs-1S for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Oct 2013 10:38:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33344) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VW5lR-0007nv-Tc for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2013 10:38:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VW5l8-0003pg-JT for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2013 10:38:25 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VW5l8-0003pc-Fk for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2013 10:38:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VW5l7-0007YA-KV for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2013 10:38:05 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Oct 2013 14:38:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15613 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15613-submit@debbugs.gnu.org id=B15613.138184786728993 (code B ref 15613); Tue, 15 Oct 2013 14:38:03 +0000 Original-Received: (at 15613) by debbugs.gnu.org; 15 Oct 2013 14:37:47 +0000 Original-Received: from localhost ([127.0.0.1]:51248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VW5ko-0007XY-Kj for submit@debbugs.gnu.org; Tue, 15 Oct 2013 10:37:47 -0400 Original-Received: from relais.videotron.ca ([24.201.245.36]:23543) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VW5km-0007XQ-Pe for 15613@debbugs.gnu.org; Tue, 15 Oct 2013 10:37:45 -0400 Original-Received: from ceviche.home ([24.201.53.56]) by VL-VM-MR006.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0MUP000R6SMWVBB0@VL-VM-MR006.ip.videotron.ca> for 15613@debbugs.gnu.org; Tue, 15 Oct 2013 10:37:44 -0400 (EDT) Original-Received: by ceviche.home (Postfix, from userid 20848) id D4FCF6609A; Tue, 15 Oct 2013 10:37:44 -0400 (EDT) In-reply-to: <525C59B0.7090804@alice.it> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:79272 Archived-At: > In the current trunk the indentation for bash scripts looks as in this test > case: > $ cat test_indent.sh > #!/bin/bash > if [ "${foo_a}" != "${foo_b}" ]; then > if [ "${foo_c}" = "${foo_d}" ]; then > echo > echo "Hello..." > echo > exit 1 > fi > fi This works correctly if you use (setq sh-use-smie t) which I recommend. It is currently not the default setting because it doesn't yet support all the indentation-config variables of the old indentation code, and doesn't support the "guess indentation settings" feature either. But in most other respects it should work "as well or better". Stefan