mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-04 11:00:45 -08:00
* 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.
47 lines
431 B
Text
47 lines
431 B
Text
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
|
|
=-=-=
|
|
|
|
Name: sh-indents5
|
|
|
|
=-=
|
|
for i do echo 1; done
|
|
for i; do echo 1; done
|
|
=-=-=
|