GNU bug report logs - #80794
31.0.50; sh-script.el: sh-mode indentation change in case after *) PATTERNs

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Kai Tetzlaff <emacs@HIDDEN>; merged with #80854; dated Fri, 10 Apr 2026 03:49:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Merged 80794 80854. Request was from Eli Zaretskii <eliz@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 80794 <at> debbugs.gnu.org:


Received: (at 80794) by debbugs.gnu.org; 11 Apr 2026 13:37:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 11 09:37:39 2026
Received: from localhost ([127.0.0.1]:47610 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wBYWn-0004yu-4p
	for submit <at> debbugs.gnu.org; Sat, 11 Apr 2026 09:37:39 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:50150)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1wBYWh-0004wL-Ow
 for 80794 <at> debbugs.gnu.org; Sat, 11 Apr 2026 09:37:33 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1wBYWb-0007xP-7d; Sat, 11 Apr 2026 09:37:25 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=O3wMFh2C+f81B3I1+R6/iTYW3u/JiFacw3709wQe9+I=; b=dOQM5zQmpsS7
 F9G5KeCt1bEjMfX4LNk/pEDFtPWXo3KsjwRHpVuLMrrpwymjc6TKk4C9RlHTZ/kARN0JXsqGuDsx6
 Vw42Azx/wPibaTVL5HzbU3lJWZHjMeqQOwElqFGzC6xXk19mX0Q9m3Z3p0hkvK0j7Tp6ecFctqPmq
 KYBMwshC9nXMkLmgNcSYmJug2pqrCkw4ZzoWZ/NcUrnqn5I1uoNRzEhE0Oz+nyMhzIjToBuNdwZPu
 5cjIDGmtADJ9fwRKpwc8biR11cuvDS/InAeV+w6E+1foruZKc+AoubSvgUdwXDvzY8Hb+Q3NFTE2Y
 ZwEKff3GAM8sq+a8XweiVQ==;
Date: Sat, 11 Apr 2026 16:37:17 +0300
Message-Id: <86v7dxsjn6.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Kai Tetzlaff <emacs@HIDDEN>, James Cherti <contact@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <87zf3bbier.fsf@HIDDEN> (message
 from Kai Tetzlaff on Fri, 10 Apr 2026 05:31:24 +0200)
Subject: Re: bug#80794: 31.0.50;
 sh-script.el: sh-mode indentation change in case after *) PATTERNs
References: <87zf3bbier.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 80794
Cc: 80794 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Kai Tetzlaff <emacs@HIDDEN>
> Date: Fri, 10 Apr 2026 05:31:24 +0200
> 
> 
> Commit b3c0aee42b0 (sh-script: Mark + and * as punctuation rather than a
> symbol constituent) changes the indentation of case statements in
> `sh-mode`. The problem affects lines following case PATTERNs ending with
> `*)` (`*` immediately followd by `)`).
> 
> Tested for `sh` and `bash` in `emacs -Q`.
> 
> Before the change:
> 
> var='foo'
> case "${var}" in
>     foo* )
>         echo '1'
>         ;;
>     bar*)
>         echo 'default'
>         ;;
>     baz)
>         echo 'default'
>         ;;
> esac
> 
> After the change (affected lines are after the `bar*)` PATTERN:
> 
> var='foo'
> case "${var}" in
>     foo* )
>         echo '1'
>         ;;
>     bar*)
>     echo 'default'
>     ;;
>     baz)
>         echo 'default'
>         ;;
> esac

Thanks.  James, any comments or suggestions?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#80794; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 10 Apr 2026 03:48:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 09 23:48:26 2026
Received: from localhost ([127.0.0.1]:48265 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wB2r2-0002RH-Ll
	for submit <at> debbugs.gnu.org; Thu, 09 Apr 2026 23:48:26 -0400
Received: from lists1p.gnu.org ([2001:470:142::17]:49612)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2)
 (envelope-from <kail@HIDDEN>)
 id 1wB2gR-0001bA-IW
 for submit <at> debbugs.gnu.org; Thu, 09 Apr 2026 23:37:28 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1)
 (envelope-from <kail@HIDDEN>)
 id 1wB2gM-0005cH-88
 for bug-gnu-emacs@HIDDEN; Thu, 09 Apr 2026 23:37:22 -0400
Received: from mx2.tetzco.de ([152.67.86.91])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1)
 (envelope-from <kail@HIDDEN>)
 id 1wB2gK-0001PU-Ia
 for bug-gnu-emacs@HIDDEN; Thu, 09 Apr 2026 23:37:21 -0400
Received: from mail.tetzco.de (unknown [IPv6:2a02:810d:1688:8242::8])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mx2.tetzco.de (Postfix) with ESMTPSA id E7C80BD08E
 for <bug-gnu-emacs@HIDDEN>; Fri, 10 Apr 2026 05:31:32 +0200 (CEST)
Received: from annapurna.tetzco.de (moka.tetzco.de
 [IPv6:2a02:810d:1688:8242::200])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mail.tetzco.de (Postfix) with ESMTPS id 319702B491E3
 for <bug-gnu-emacs@HIDDEN>; Fri, 10 Apr 2026 05:31:25 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tetzco.de; s=20210624; 
 t=1775791888;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type;
 bh=SwUzS5HxItofIf2fvq18xXVml8TSzDRkAd+myt13OTk=;
 b=fgJnxWUwIn5Pz9seMcT3gBmKI+h3xuN8dgwePRKwBL50ZxMicW/+UdmDZTecra4c8tCybx
 8Rz9OkDBJyJ6ZqIwMvi1DBiU6wCjxxiGJMlM5CG+xGQY/1yVQcuQy60yzU4B58Y09YFXvw
 V0RJIUHA8oOuhMS6t80t7ybqNH/mrfgC7mxZSkPqdayIW3dpp6/kpufOJPuGx8vmq5SnJy
 2o94Tg6o30yL+bbb5QDxMupJlpx4a7bN4ZuzLbQiQhHOErQSQ3UaEpkDiUk2rjpxpEfbl1
 AeQkzvGWn2ItmR//sIo6bh1VHfu2A4ukqxseIpESjAyUqxSygYfBYUCSty6wD5pxefDROg
 KH9dnY0ka+EzbIuUoHagX/9z18IRmy90JRXOV1aaCu6SnyCkunD80bshRHyAbvcLjgvEuJ
 sTO4g1kgTOS/VZvfBA/3wB8kyb+tvhvaPXewg+/UI5RPF+ygLAzytDQEMya2sAqdzGahJY
 yrYtut+9I5J8NN2Zc2foNg9dupBoviGN+18rcOlUXHShNWVyHH1llVOew46vqStsnY2PRw
 xiA2kNzSTuUb/eMgpgBFqINfrp4HircYNweMlr3EWSs/fSf/u0aaGucUNCw7Kf+oG3CwIX
 51nFhMVvoTd0GI1M5qTd/kgXBt9ez4imHXj0Yy9Uai2UwMF1X13pc=
Received: by annapurna.tetzco.de (Postfix, from userid 1000)
 id E898A9C003C; Fri, 10 Apr 2026 05:31:24 +0200 (CEST)
From: Kai Tetzlaff <emacs@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 31.0.50; sh-script.el: sh-mode indentation change in case after *)
 PATTERNs
X-Debbugs-Cc: 
Date: Fri, 10 Apr 2026 05:31:24 +0200
Message-ID: <87zf3bbier.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Rspamd-Queue-Id: 319702B491E3
X-Spamd-Result: default: False [0.69 / 30.00]; R_MISSING_CHARSET(0.50)[];
 FORGED_SENDER(0.30)[emacs@HIDDEN,kail@HIDDEN];
 MIME_GOOD(-0.10)[text/plain]; BAYES_HAM(-0.01)[50.87%];
 ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_ONE(0.00)[1];
 MISSING_XM_UA(0.00)[]; RCVD_COUNT_ONE(0.00)[1];
 DKIM_SIGNED(0.00)[tetzco.de:s=20210624];
 TO_MATCH_ENVRCPT_ALL(0.00)[];
 FROM_NEQ_ENVFROM(0.00)[emacs@HIDDEN,kail@HIDDEN];
 RCVD_TLS_LAST(0.00)[]; LOCAL_OUTBOUND(0.00)[];
 TO_DN_NONE(0.00)[]; FROM_HAS_DN(0.00)[]
X-Rspamd-Action: no action
X-Rspamd-Server: rakaposhi
Received-SPF: none client-ip=152.67.86.91;
 envelope-from=kail@HIDDEN; helo=mx2.tetzco.de
X-Spam_score_int: -16
X-Spam_score: -1.7
X-Spam_bar: -
X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.248,
 NO_DNS_FOR_FROM=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001,
 SPF_NONE=0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Thu, 09 Apr 2026 23:48:23 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)


Commit b3c0aee42b0 (sh-script: Mark + and * as punctuation rather than a
symbol constituent) changes the indentation of case statements in
`sh-mode`. The problem affects lines following case PATTERNs ending with
`*)` (`*` immediately followd by `)`).

Tested for `sh` and `bash` in `emacs -Q`.

Before the change:

var='foo'
case "${var}" in
    foo* )
        echo '1'
        ;;
    bar*)
        echo 'default'
        ;;
    baz)
        echo 'default'
        ;;
esac

After the change (affected lines are after the `bar*)` PATTERN:

var='foo'
case "${var}" in
    foo* )
        echo '1'
        ;;
    bar*)
    echo 'default'
    ;;
    baz)
        echo 'default'
        ;;
esac



In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.51, cairo version 1.18.4) of 2026-03-08 built on annapurna
Repository revision: af7fd2f7ddac6ca2a227fb0d7ebcc20dd8f17d8e
Repository branch: sieve-manage
System Description: Debian GNU/Linux forky/sid

Configured using:
 'configure --with-pgtk --without-xwidgets --with-native-compilation'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY
PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB

Important settings:
  value of $LC_COLLATE: de_DE.UTF-8
  value of $LC_CTYPE: de_DE.UTF-8
  value of $LC_MESSAGES: en_US.UTF-8
  value of $LC_MONETARY: en_IE.UTF-8
  value of $LC_NUMERIC: en_US.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: Shell-script

Minor modes in effect:
  sh-electric-here-document-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-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
  minibuffer-nonselected-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(textsec uni-scripts url url-proxy url-privacy url-expand url-methods
url-history url-cookie generate-lisp-file url-domsuf url-util
idna-mapping ucs-normalize uni-confusable textsec-check help-mode pp
shadow sort mail-extr emacsbug lisp-mnt message mailcap yank-media puny
dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068
epg-config gnus-util time-date mm-decode mm-bodies mm-encode mailabbrev
gmm-utils mailheader sendmail mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils vc-git diff-mode track-changes
easy-mmode files-x vc-dispatcher sh-script smie treesit executable
compile text-property-search comint ansi-osc ansi-color ring comp-run
bytecomp byte-compile comp-common rx ffap thingatpt url-parse
auth-source cl-seq eieio eieio-core cl-macs gv icons cl-loaddefs cl-lib
password-cache json subr-x mule-util map url-vars rmc iso-transl tooltip
cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/pgtk-win pgtk-win term/common-win touch-screen
pgtk-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list
replace newcomment text-mode lisp-mode prog-mode register page tab-bar
menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse
jit-lock font-lock syntax font-core term/tty-colors frame minibuffer
nadvice seq simple cl-generic indonesian philippine 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 emoji-zwj charscript charprop
case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo gtk pgtk lcms2 multi-tty move-toolbar
make-network-process tty-child-frames native-compile emacs)

Memory information:
((conses 16 237831 19897) (symbols 48 9778 2) (strings 32 41268 2287)
 (string-bytes 1 972727) (vectors 16 38727)
 (vector-slots 8 533317 65252) (floats 8 37 62) (intervals 56 689 15)
 (buffers 1064 16))




Acknowledgement sent to Kai Tetzlaff <emacs@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#80794; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 18 Apr 2026 08:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.