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 #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Angelo Graziosi <angelo.graziosi <at> alice.it>
To: bug-emacs <bug-gnu-emacs <at> gnu.org>
Subject: Wrong indentation in Shell-script[sh] mode?
Date: Mon, 14 Oct 2013 22:53:04 +0200
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


The inner if-fi looks ok but in the outer one expects the last fi under 
the first if.. Or not?

This happens with

$ emacs -Q &

and using TAB to indent..


Ciao,
 Angelo.




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.