bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15613: Wrong indentation in Shell-script[sh] mode?


From: Stefan Monnier
Subject: bug#15613: Wrong indentation in Shell-script[sh] mode?
Date: Tue, 15 Oct 2013 10:37:44 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]