GNU bug report logs - #65975
Wrong indentation for shell-script mode with stuff after a pipe after a "done"

Previous Next

Package: emacs;

Reported by: Dan Jacobson <jidanni <at> jidanni.org>

Date: Thu, 14 Sep 2023 09:09:01 UTC

Severity: minor

Full log


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

From: Dan Jacobson <jidanni <at> jidanni.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Wrong indentation for shell-script mode with stuff after a pipe
 after a "done"
Date: Thu, 14 Sep 2023 04:08:17 -0500
If one does C-x h TAB, one will see this is wrongly indented at the end.
Indeed, the problem starts at the "|wc".

$ cat b.sh
if true
then
    for i
    do echo
    done|
	wc
fi

if true
then
    for i
    do echo
    done|wc
    fi
       : bla
$ sh -n b.sh
$ emacs -Q b.sh
emacs-version "29.1"




This bug report was last modified 1 year and 273 days ago.

Previous Next


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