GNU bug report logs - #15613
Wrong indentation in Shell-script[sh] mode?

Previous Next

Package: emacs;

Reported by: Angelo Graziosi <angelo.graziosi <at> alice.it>

Date: Mon, 14 Oct 2013 20:54:01 UTC

Severity: normal

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 15613 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Angelo Graziosi <angelo.graziosi <at> alice.it>
Cc: 15613 <at> debbugs.gnu.org
Subject: Re: bug#15613: Wrong indentation in Shell-script[sh] mode?
Date: Tue, 15 Oct 2013 10:37:44 -0400
> 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




This bug report was last modified 11 years and 217 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.