Subject: 27.1; AWK wrong switch-case indentation

From: Mauro Panigada <[email-masked]>
Date: Sun, 4 Oct 2020 15:13:13 +0200

In AWK mode, switch's cases get indented as statement of the previous
case, instead of being "aligned" with the first case line. We end up
having something like

   switch($1)
   {
      case "a":
         things()
         break

         case "b":
            hello = 0
            break

            case "bye":
               indent_again = 1
               break

               # ....
   }

In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.12)
 of 2020-08-30 built on Mister-X
Windowing system distributor 'The X.Org Foundation', version 11.0.12005000
System Description: Ubuntu 19.10

Recent messages:
Mark saved where search started
(New file)
Making completion list...
next-line: End of buffer
Making completion list...
Auto-saving...done
previous-line: Beginning of buffer [2 times]
Making completion list... [2 times]
user-error: End of history; no default available
delete-backward-char: Text is read-only

Configured using:
 'configure --prefix=/home/user/.local/ 'CFLAGS=-mtune=corei7 -O3 -mavx2
 -msse4.2''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD PDUMPER
LCMS2 GMP

Important settings:
  value of $LC_MONETARY: it_IT.UTF-8
  value of $LC_NUMERIC: en_DK.UTF-8
  value of $LC_TIME: en_DK.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: AWK//l

Minor modes in effect:
  delete-selection-mode: t
  show-paren-mode: t
  cua-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug sendmail mm-archive mule-util gnutls
network-stream url-http url-gw nsm url-cache url-auth cua-rect rect
misearch multi-isearch cc-awk cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs markdown-mode color
thingatpt view org-element avl-tree generator ol-eww ol-rmail ol-mhe
ol-irc ol-info ol-gnus nnir gnus-sum url url-proxy url-privacy
url-expand url-methods url-history mailcap shr url-cookie url-domsuf
url-util svg xml dom gnus-group gnus-undo gnus-start gnus-cloud nnimap
nnmail mail-source utf7 netrc nnoo parse-time iso8601 gnus-spec gnus-int
gnus-range message rmc puny rfc822 mml mml-sec epa derived epg
epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail
rmail-loaddefs rfc2047 rfc2045 ietf-drums text-property-search
mail-utils mm-util mail-prsvr wid-edit ol-docview doc-view jka-compr
image-mode exif dired dired-loaddefs ol-bibtex bibtex ol-bbdb ol-w3m org
ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote
org-src ob-comint org-pcomplete pcomplete comint ansi-color ring
org-list org-faces org-entities time-date noutline outline easy-mmode
org-version ob-emacs-lisp ob-core ob-eval org-table ol org-keys
org-compat advice org-macs org-loaddefs format-spec find-func cal-menu
calendar cal-loaddefs perl6-detect leuven-theme delsel paren cua-base
cus-start cus-load finder-inf rx info package easymenu browse-url
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify lcms2 dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 323421 26493)
 (symbols 48 24386 2)
 (strings 32 95162 7634)
 (string-bytes 1 2959769)
 (vectors 16 35946)
 (vector-slots 8 416297 26914)
 (floats 8 399 312)
 (intervals 56 11341 466)
 (buffers 1000 28))

-- 
*Mauro Panigada*
https://www.mauropanigada.net
http://shintakezou.blogspot.com