Subject: bug#30561: 25.2.50; sh-mode indentation for ? case wrong

From: Allen Li <[email-masked]>
Date: Tue, 20 Feb 2018 23:20:01 +0000

1. emacs -Q
2. Open file tmp.sh with contents (defaults to sh-mode):

case "$1" in
foo)
echo foo
;;
?)
echo bar
;;
esac

3. C-x h TAB

Expected:

case "$1" in
     foo)
         echo foo
         ;;
     ?)
         echo bar
         ;;
esac

Actual:

case "$1" in
     foo)
         echo foo
         ;;
     ?)
     echo bar
     ;;
esac

In GNU Emacs 25.2.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11),
modified by Debian
Windowing system distributor 'The X.Org Foundation', version 11.0.11903000
System Description: Debian GNU/Linux rodete (upgraded from: Ubuntu 14.04
LTS)