]> git.eshelyaron.com Git - emacs.git/commit
Fix indentation and fontification in shell-script (Bug#26217)
authorMauro Aranda <maurooaranda@gmail.com>
Sat, 14 Oct 2023 12:05:35 +0000 (09:05 -0300)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 14 Oct 2023 15:00:15 +0000 (11:00 -0400)
commitad02fc212b5a88d2ea793858d538809d9976b154
tree7552c560f37894fc2c03b8301fb6eddb63443018
parent1f95f91d855b8e6fd4221650b7878008f7665454
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.
lisp/progmodes/sh-script.el
test/lisp/progmodes/sh-script-resources/sh-indents.erts
test/lisp/progmodes/sh-script-tests.el