From: Stefan Monnier Date: Fri, 12 Jan 2024 03:12:34 +0000 (-0500) Subject: sh-script.el: Add support for `case FOO {...}` (bug#55764) X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=eac3f2a80778b3904c55ae7b65ff862a79eebf2a;p=emacs.git sh-script.el: Add support for `case FOO {...}` (bug#55764) * lisp/progmodes/sh-script.el (sh-font-lock-paren): Also recognize `FOO)` after `{`. (sh-smie-sh-rules): Make `for` rule apply to `case FOO { ...}` as well. * test/manual/indent/shell.sh: Add new test case. --- diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 0562415b4e5..2a650fe0ea6 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1054,7 +1054,8 @@ subshells can nest." ;; a normal command rather than the real `in' keyword. ;; I.e. we should look back to try and find the ;; corresponding `case'. - (and (looking-at ";\\(?:;&?\\|[&|]\\)\\|\\_