Commit graph

3 commits

Author SHA1 Message Date
Michael Albinus
aa356d03ae Make sh-script-tests.el more robust
* test/lisp/progmodes/sh-script-tests.el (test-sh-script-indentation)
(test-basic-sh-indentation, test-indent-after-continuation):
* test/lisp/progmodes/sh-script-resources/sh-indents.erts (Code):
Skip if `sh-indent-supported-here' is nil.  (Bug#70196)
2024-04-05 19:43:56 +02:00
Mauro Aranda
ad02fc212b Fix indentation and fontification in shell-script (Bug#26217)
* lisp/progmodes/sh-script.el (sh-smie--sh-keyword-p): Treat "do" as
special, like we treat "in".
(sh-smie--sh-keyword-in-p): Change signature.  Take the token to
decide correctly if it's a keyword.
(sh-font-lock-keywords-var-1): Add do.

* test/lisp/progmodes/sh-script-resources/sh-indents.erts: New test.
* test/lisp/progmodes/sh-script-tests.el
(sh-script-test-do-fontification): New test.
2023-10-14 11:00:15 -04:00
Lars Ingebrigtsen
985e7148a7 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).
2022-02-07 09:13:54 +01:00