From 985e7148a7576327e30fe9c48414a5c033ca42b2 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 7 Feb 2022 09:13:46 +0100 Subject: Improve indentation of some shell script forms * lisp/progmodes/sh-script.el (sh-smie--default-backward-token): Don't skip past things like "true;then" (bug#53817). --- .../progmodes/sh-script-resources/sh-indents.erts | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 test/lisp/progmodes/sh-script-resources/sh-indents.erts (limited to 'test/lisp/progmodes/sh-script-resources') diff --git a/test/lisp/progmodes/sh-script-resources/sh-indents.erts b/test/lisp/progmodes/sh-script-resources/sh-indents.erts new file mode 100644 index 00000000000..1f92610b3aa --- /dev/null +++ b/test/lisp/progmodes/sh-script-resources/sh-indents.erts @@ -0,0 +1,40 @@ +Code: + (lambda () + (shell-script-mode) + (indent-region (point-min) (point-max))) + +Name: sh-indents1 + +=-= +if test;then + something +fi +other +=-=-= + +Name: sh-indents2 + +=-= +if test; then + something +fi +other +=-=-= + +Name: sh-indents3 + +=-= +if test ; then + something +fi +other +=-=-= + +Name: sh-indents4 + +=-= +if test ;then + something +fi +other +=-=-= -- cgit v1.2.3