From unknown Sat Jun 21 05:16:42 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#78159 <78159@debbugs.gnu.org> To: bug#78159 <78159@debbugs.gnu.org> Subject: Status: shell-script indent regression in Emacs 30 Reply-To: bug#78159 <78159@debbugs.gnu.org> Date: Sat, 21 Jun 2025 12:16:42 +0000 retitle 78159 shell-script indent regression in Emacs 30 reassign 78159 emacs submitter 78159 john.ciolfi.32@gmail.com severity 78159 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 30 02:56:29 2025 Received: (at submit) by debbugs.gnu.org; 30 Apr 2025 06:56:29 +0000 Received: from localhost ([127.0.0.1]:38957 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uA1Mo-00049D-Lv for submit@debbugs.gnu.org; Wed, 30 Apr 2025 02:56:29 -0400 Received: from lists.gnu.org ([2001:470:142::17]:47796) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u9qP1-0006Mz-5d for submit@debbugs.gnu.org; Tue, 29 Apr 2025 15:14:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u9qOt-0008Fc-IM for bug-gnu-emacs@gnu.org; Tue, 29 Apr 2025 15:13:51 -0400 Received: from mail-centralusazlp170100005.outbound.protection.outlook.com ([2a01:111:f403:c111::5] helo=DM1PR04CU001.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u9qOq-0003mW-5T for bug-gnu-emacs@gnu.org; Tue, 29 Apr 2025 15:13:51 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jbXl0HALs6o6ht8P/IhOjRhvZmBsGukeOFKZXERFOm3IPpndTFjDIzzxeD8denm3v0Xr0G6cvxvn5bQradFJFS63qNNGvLxRkfABNXPH7SRRJEeS7cv8OTkupURq8qXrPbW9idGhO9V6sZekMA5kQetgFg/42k0lgGMu8g2jiV9gOCDFjn6j5lb6MgSsP33loscG7bVTt4kDJTW/Cw7S4EB5PBRLCtjADCdiOq0OOLsLv0EoxvlCWcVz1ts/a4SrwCr/xB54zQI5hZBi48yrNF0AKcKcU8KBerVhI5srGDZQEQ6ZvtXKL+mWvMlmI4AbTBK4tm5l8z1WO71NN5a5WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=aQayV3EWbn+HpYalr7R0+bTVzURypFWgt7AuRJMNuUY=; b=Igr+cH84BiT4p1NVgH4jSlL8+7pa/Azo1GrChJqBTSgsVhQ5eFVwdMV0l8h3puCCblqmQYlogaPVwGfIC07mlCS6L3ea1KcEUH/ga4OYXqhwOJtAapx9f/mtRls5EmxI1bHaOSjQ5Lntgo0nYBnuNg3NUo7dq1qsH3J3fC2Q2Qa6BGgfBU5BYtwUCuiTyeSSyPE57HSU6uTIrWTm8teU462RLlXAclOGLmvGhFVE/IRbezG3BYwo+BHViDwjwzpgY4CO4HY9GTUcRs1W9DjrM8pSelKxNzjdAWXulypryXnMK3DWibN4fM5EhPMwRryGoiete0R4TUhEdsio63AevA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 144.212.100.35) smtp.rcpttodomain=gmail.com smtp.mailfrom=mathworks.com; dmarc=fail (p=none sp=quarantine pct=100) action=none header.from=gmail.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mathworks.onmicrosoft.com; s=selector2-mathworks-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aQayV3EWbn+HpYalr7R0+bTVzURypFWgt7AuRJMNuUY=; b=siJWu1AngcqDKWiq3pMnS5tX66QHNMRoLUN3TSgAy9/pHyhJm0oBVbf2KCbqKOkcBkNlSqBsnzq8q3TtK98RbicFG27WxFMmA/9wpZxOw9Rdbmym6U7FWz6+kADiugf0Gs7j6D197nkah4JWTmUU5o6xTyoH7IothOC58OZVv3aAqPg6mE5YYkRYur7nACtpOcwWsQTf8K72O7zaqn6fJXOcNqbQxn3CFgKuuhFVvV2KrAxxlpXpszpKQZ+GyzSc/MKH/BYBRcbMzXeyk+nm8IWbfdhFAGiuu/DDDLeNL8difvZWBZRX7rfX8o+65CEqSdibPB5ieSNYqBv++WmmhA== Received: from BN0PR02CA0016.namprd02.prod.outlook.com (2603:10b6:408:e4::21) by IA1PR05MB10301.namprd05.prod.outlook.com (2603:10b6:208:3af::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8678.31; Tue, 29 Apr 2025 19:02:29 +0000 Received: from BN2PEPF00004FBA.namprd04.prod.outlook.com (2603:10b6:408:e4:cafe::95) by BN0PR02CA0016.outlook.office365.com (2603:10b6:408:e4::21) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8655.37 via Frontend Transport; Tue, 29 Apr 2025 19:02:29 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 144.212.100.35) smtp.mailfrom=mathworks.com; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=gmail.com; Received-SPF: Pass (protection.outlook.com: domain of mathworks.com designates 144.212.100.35 as permitted sender) receiver=protection.outlook.com; client-ip=144.212.100.35; helo=exedge.mathworks.com; pr=C Received: from exedge.mathworks.com (144.212.100.35) by BN2PEPF00004FBA.mail.protection.outlook.com (10.167.243.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8699.20 via Frontend Transport; Tue, 29 Apr 2025 19:02:29 +0000 Received: from EX1900AH.mathworks.com (172.31.53.33) by EX19EDGE00AH.mathworks.com (172.31.187.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Tue, 29 Apr 2025 15:02:12 -0400 Received: from EX1900AH.mathworks.com (172.31.53.33) by EX1900AH.mathworks.com (172.31.53.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Tue, 29 Apr 2025 15:02:12 -0400 Received: from mail-vif.mathworks.com (144.212.95.101) by EX1900AH.mathworks.com (172.31.53.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10 via Frontend Transport; Tue, 29 Apr 2025 15:02:11 -0400 Received: from ah-ciolfi-l.dhcp.mathworks.com (ah-ciolfi-l.dhcp.mathworks.com [172.21.82.138]) by mail-vif.mathworks.com (8.14.7/8.14.7) with ESMTP id 53TJ2Bdg024294; Tue, 29 Apr 2025 15:02:11 -0400 Received: from ah-ciolfi-l.dhcp.mathworks.com (localhost [127.0.0.1]) by ah-ciolfi-l.dhcp.mathworks.com (8.17.1.9/8.17.1.9/Debian-2+deb12u2) with ESMTP id 53TJ2B3H3977247; Tue, 29 Apr 2025 15:02:11 -0400 Received: (from ciolfi@localhost) by ah-ciolfi-l.dhcp.mathworks.com (8.17.1.9/8.17.1.9/Submit) id 53TJ2Beq3977245; Tue, 29 Apr 2025 15:02:11 -0400 X-Authentication-Warning: ah-ciolfi-l.dhcp.mathworks.com: ciolfi set sender to ciolfi@mathworks.com using -f From: John Ciolfi To: Subject: shell-script indent regression in Emacs 30 Date: Tue, 29 Apr 2025 15:02:11 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF00004FBA:EE_|IA1PR05MB10301:EE_ X-MS-Office365-Filtering-Correlation-Id: 2d7e69c7-9df2-4f3c-fa5e-08dd8750637d X-MS-Exchange-SenderADCheck: 0 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|48200799018|7093399015|61400799027|376014|36860700013|82310400026|35450700002; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?y/w9w53qKuVQqhc2H+Ny211PrGbbWH3ga/NWF8AkicJXxaThEbFC2d3KS92W?= =?us-ascii?Q?YJw+CA1nTg6/wsfKNar9viN9cEfIkOS2PIgO2vV08oQAMPx9dl9DUjvoNsLG?= =?us-ascii?Q?sIQSt2m4Y53U/iRdsrQ9X9tFUgyHAa9ZPsFj4EyEjnkJPBCGoH0HKRO4wiGc?= =?us-ascii?Q?YKkRB+8H5bOgDGzNNXbIuU9wCD5OF+92mjdpUtykoRurvB4tpMYgMuHG+nt+?= =?us-ascii?Q?5y87t/lzVcvGBOKx913esN2akySu1jQ7MV1tMXLoFWO5NfgJHsvLX0xsKjFZ?= =?us-ascii?Q?vuKVoWzbosEAcFm6YbyTz9BkqrsKzZ/KVMDNs/R3LtPNtAnxqDOwc74a56K7?= =?us-ascii?Q?K8AOArY5ISdKRIS+oOTYalitfDeTzAJcrhjkq2/bEuZIqCiiu2NZoCWZWWOt?= =?us-ascii?Q?QMUJUd0TuYeIejtEcGahT2EMVTdGt/HKgNeKyKJgignLIFBSR+PABvaFBh3O?= =?us-ascii?Q?GU/XWJkajRJYwqo4ZZddEpTTBd8+64J/bS55AOt9RgNoMVi0zmEiftsEyKyp?= =?us-ascii?Q?g3PHR0i2ThWGihIXavqlZ/lPtrCxdceeZxjfgZ8u70R5ubvzqs2N65lOB+O9?= =?us-ascii?Q?SsCWM5PHVH/CWzcZyfYaFzsiDru/+sThNleaZ4VqhKOiHtwuThBSChyZT1CY?= =?us-ascii?Q?ZFPR+metcy+bzbnd9tCUtYSsH5XHlVEE7+19hv1F9Bq5H7nq3sOyT5MA0Psk?= =?us-ascii?Q?d+CClAFHYxdEio9IMLqufjv3iZ5Mr66U9wUp3sPUsR/RoeEzsRAB2e1uRpZx?= =?us-ascii?Q?w2d9lsWoq20B6Nt8YlETNRCa2v6MMJXvv43t902Hbf2MiZtDhFDap1SQEmoa?= =?us-ascii?Q?m3xrxl5h+4tp4eKpRIk5pmlprAuU2YeR1nng/UuzmpLaiD0NJltbE6TINech?= =?us-ascii?Q?Da/nLFNSIc4ros7/16J1XXbLQdCgKdtJ9N1ac/YOQB3CTcEn39rYuwZ8OzMu?= =?us-ascii?Q?ODNNopSnt6IBZPps72Gdo9iXhXTiYoGio1sXI5D6yfk+l33E2Nuce77llKjh?= =?us-ascii?Q?31op+my5B/VDsZjVay2O+LAM9njtOi2mUHRAlZgI+ilEYywGQx/QcUByWZkv?= =?us-ascii?Q?wI1UnbMSlJzaNIYVvTe44Ns6nqCRRWeQgjy4sC0dr1zkowa5EibY6XZloj13?= =?us-ascii?Q?WpGJQBvdqd1PmBwf1bxsxZNTc1Oula07gLbEZeATFWH40GwWxXItbjb1wpSb?= =?us-ascii?Q?BuKl+PIEaerQHTlBIrYTJpnqJJLMqzSD39Z8wgP5igM05tGo2PfVE56f2OqH?= =?us-ascii?Q?UjzzKSSxtb4+ECBfaVm5qxWRrAg/2xoCNC/2BISRF5HMEcQ7x4mxEwPY2iwJ?= =?us-ascii?Q?9xeuGzbRv03UBOsvK8B9+4I679GJ+z+9aPpendWFNEowsK9erV/jMNls/Mqv?= =?us-ascii?Q?o5bn67niGCINSBlbJnSprlUGLu3EBNF74iJp8eaaYsf6UB27SqaEU5kqK08q?= =?us-ascii?Q?udzsAODPTHj4Llyn3CBCMsAHaKkKw5YY22QrAAPutJRAUkDqIFY3mFW0NuwY?= =?us-ascii?Q?1zHBvKJwcryaCE6E63Dvm/YucolkpmUWVc93RuFGO9p1b2y1/8H35E8m1uBq?= =?us-ascii?Q?5Pfkz1nPCrcLXJJu6Hc=3D?= X-Forefront-Antispam-Report: CIP:144.212.100.35; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:exedge.mathworks.com; PTR:mxgw-ah.mathworks.com; CAT:NONE; SFS:(13230040)(48200799018)(7093399015)(61400799027)(376014)(36860700013)(82310400026)(35450700002); DIR:OUT; SFP:1101; X-OriginatorOrg: mathworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2025 19:02:29.1934 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2d7e69c7-9df2-4f3c-fa5e-08dd8750637d X-MS-Exchange-CrossTenant-Id: 99dd3a11-4348-4468-9bdd-e5072b1dc1e6 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=99dd3a11-4348-4468-9bdd-e5072b1dc1e6; Ip=[144.212.100.35]; Helo=[exedge.mathworks.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF00004FBA.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR05MB10301 Received-SPF: pass client-ip=2a01:111:f403:c111::5; envelope-from=ciolfi@mathworks.com; helo=DM1PR04CU001.outbound.protection.outlook.com X-Spam_score_int: 3 X-Spam_score: 0.3 X-Spam_bar: / X-Spam_report: (0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, FREEMAIL_REPLYTO_END_DIGIT=0.25, HEADER_FROM_DIFFERENT_DOMAINS=0.001, NML_ADSP_CUSTOM_MED=0.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi In the following shell-script, the use of subshell, in this case, wrapping the "id" command in parens, causes Emacs 30 to incorrectly indent the lines that follow use of subshells. Notice if you remov [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 FORGED_GMAIL_RCVD 'From' gmail.com does not match 'Received' headers -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (john.ciolfi.32[at]gmail.com) 0.2 FREEMAIL_REPLYTO_END_DIGIT Reply-To freemail username ends in digit (john.ciolfi.32[at]gmail.com) 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org] 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 0.0 SPOOFED_FREEMAIL No description available. 0.4 SPOOF_GMAIL_MID From Gmail but it doesn't seem to be... X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 30 Apr 2025 02:56:24 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: john.ciolfi.32@gmail.com Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi In the following shell-script, the use of subshell, in this case, wrapping the "id" command in parens, causes Emacs 30 to incorrectly indent the lines that follow use of subshells. Notice if you remov [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org] 1.0 FORGED_GMAIL_RCVD 'From' gmail.com does not match 'Received' headers -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (john.ciolfi.32[at]gmail.com) 0.2 FREEMAIL_REPLYTO_END_DIGIT Reply-To freemail username ends in digit (john.ciolfi.32[at]gmail.com) 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Hi In the following shell-script, the use of subshell, in this case, wrapping the "id" command in parens, causes Emacs 30 to incorrectly indent the lines that follow use of subshells. Notice if you remove the parens from id indentation is correct. The behavior is correct in Emacs 29, but not Emacs 30. This issue can shift all lines in a shell script following the use of a subshell. ---- example.sh ---- #!/bin/bash haveid1 () { (id) 2> /dev/null 1>&2 if [ $? -eq 0 ]; then echo "haveid1: yes" else echo "haveid1: no" fi } haveid2 () { id 2> /dev/null 1>&2 if [ $? -eq 0 ]; then echo "haveid2: yes" else echo "haveid2: no" fi } In GNU Emacs 30.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.16.0) of 2025-04-04, modified by Debian built on sbuild Windowing system distributor 'The X.Org Foundation', version 11.0.12101006 System Description: Debian GNU/Linux 12 (bookworm) Configured using: 'configure --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/libexec --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/30.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/30.1/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/libexec --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/30.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/30.1/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --with-cairo --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2 -ffile-prefix-map=/build/reproducible-path/emacs-30.1+1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 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 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-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: (shadow sort mail-extr emacsbug pulse color xref project oc-basic org-element org-persist org-id org-refile org-element-ast inline avl-tree generator ol-eww eww xdg url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig gnus-sum shr pixel-fill kinsoku url-file svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus compile comp-run xml gnus-cloud nnimap nnmail browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util url-parse auth-source cl-seq eieio eieio-core cl-macs json map url-vars mail-source utf7 nnoo parse-time gnus-spec gnus-int gnus-range message sendmail mailcap yank-media puny rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util mail-utils range mm-util mail-prsvr wid-edit ol-docview doc-view filenotify image-mode exif dired dired-loaddefs ol-bibtex bibtex iso8601 ol-bbdb ol-w3m ol-doi org-link-doi org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete pcomplete comint ansi-osc ansi-color ring org-list org-footnote org-faces org-entities noutline outline icons org-version ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys oc org-loaddefs cal-menu calendar cal-loaddefs org-compat org-macs format-spec misearch multi-isearch cl-print byte-opt gv bytecomp byte-compile time-date subr-x pcase edebug debug backtrace jka-compr cl-extra shortdoc text-property-search comp-common help-fns radix-tree help-mode thingatpt find-func sh-script rx smie treesit cl-loaddefs cl-lib executable rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd touch-screen 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 lcms2 dynamic-setting system-font-setting font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar make-network-process native-compile emacs) Memory information: ((conses 16 434138 109987) (symbols 48 22590 4) (strings 32 107934 6084) (string-bytes 1 3306214) (vectors 16 63088) (vector-slots 8 1428105 82431) (floats 8 870 285) (intervals 56 6273 2078) (buffers 992 21)) From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 30 10:07:37 2025 Received: (at 78159) by debbugs.gnu.org; 30 Apr 2025 14:07:37 +0000 Received: from localhost ([127.0.0.1]:43463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uA85y-000662-R9 for submit@debbugs.gnu.org; Wed, 30 Apr 2025 10:07:36 -0400 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]:49446) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uA6sm-0006eI-EA for 78159@debbugs.gnu.org; Wed, 30 Apr 2025 08:49:49 -0400 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-5e6c18e2c7dso540051a12.3 for <78159@debbugs.gnu.org>; Wed, 30 Apr 2025 05:49:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746017381; x=1746622181; darn=debbugs.gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=Wp8Q1RACvZyIa8c1feFqGblOYemkdy2t0eBGx58MB3E=; b=JLZcoK9oVMXAZGTIQZvPH2FSRTSdVcrKSZSCsmWEhoMfJHp6mrFk8kT/nQplsx7o1z J40ccII7dobvjl9vyfIulafdsI6RmqugoXdquKRtAzMQz+DYjylv7ULczStTRXbfUEn2 M8++yyf8rGVT85rsBi4sEiRomZjoTaFEEyjNchLmkQrp0ZjogzNlK/qYop7MZtNs1ozH GFiD8lzT66VoOA1EkVgtu633ynbZZFyHjvJ6jAwCo4jc+NJYSzlMuwuXnJV0aNuz7WWC a1DMoxEmr73mL2uZk2XE7KLaub6TnFsVzThJR3o6S4co2ma98TNeWDCxFpx0peh5guKC LLgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746017381; x=1746622181; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Wp8Q1RACvZyIa8c1feFqGblOYemkdy2t0eBGx58MB3E=; b=jYwmSwQtgme6U7WgvYhGuiFE+aMwJoJtiRc/asEfCZurY+rsV7dHY/KFk2AUcpDWeu 4DcDR6SWf17dKT9FXaSUUSaPQvNj9v5prcGj/kqAf8dBbnq8JjMPf+MU51zrwACzpibg IFOSmRtzCvr4gZ7KGStg87Oc7bRs9SwTbsndDpPfQxURZxJMPGlchAq8dwYmrb2gjcpO 6tNELjFYXa+RmQPvfRpht5yxZzXnEmzjtKFuWXpgxzfuGzvSrvhkPXImtkL5HEYQD//I HTEY9xNNPquxFi2GS1g4rKAjqTDzVKaCUJm7S+JL3ZfdMiOa1iLSfbLbzfkfTSOu5xSM l3qQ== X-Gm-Message-State: AOJu0Yw/+eAA1qsxjb/kI70663sHbkCi4a206GbZyurM8cOxIXJxrEg2 QUnXplziEl2x7n/gxRpNpmQ2Go5UDTubiSu8DvvNsscLKLI7S6zedX0VznWTzUr3gMBAjvDJj7T U/8PzOpok3P554Q4Ma45/mHfGo52u2Ebe X-Gm-Gg: ASbGncvubOxSxdUMnuBJ7hpQBo3f5G+YaUo8oSOEynovs5tHwakUoWt2QUqdexMIXjQ 4Tfb+3dpDLTKddzdGNzC3o78CVtKgj4fMyy3y7MLO/B1V1GYT/B+/gGtcG6phefaXedxQXJjC7/ zL+tkBx9Q1zGdbDBzJRPm2zozAhwTEUfgO X-Google-Smtp-Source: AGHT+IEI8n+nHrc/d0XaAqkTUyAn0SwIxqfsNV1qKxLIMqDjN0x3+up/42wZL8kSf8Y0wjAuRVtMvQ1nWiyUz5qWKec= X-Received: by 2002:a05:6402:5242:b0:5e6:de5:312f with SMTP id 4fb4d7f45d1cf-5f89bd2ce93mr2413486a12.23.1746017381161; Wed, 30 Apr 2025 05:49:41 -0700 (PDT) MIME-Version: 1.0 From: John C Date: Wed, 30 Apr 2025 08:49:28 -0400 X-Gm-Features: ATxdqUFf1L1fwWMqcDce26dSF7EoOCpv7q_Fy5uJXLGkA6-uY5iLqWojwo0cfv8 Message-ID: Subject: RE: shell-script indent regression in Emacs 30 To: 78159@debbugs.gnu.org Content-Type: multipart/alternative; boundary="000000000000c6a6450633fe59ca" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 78159 X-Mailman-Approved-At: Wed, 30 Apr 2025 10:07:27 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --000000000000c6a6450633fe59ca Content-Type: text/plain; charset="UTF-8" Hi I debugged this a little and see the regression occurred when sh-script.el sh-font-lock-paren was changed in Emacs 30 to have: ;; Also recognize OpenBSD's case X { ... } (bug#55764). (and (looking-at ";\\(?:;&?\\|[&|]\\)\\|\\_Hi=C2=A0

I debugged this a little and s= ee=C2=A0the regression occurred when sh-script.el=C2=A0 sh-font-lock-paren= =C2=A0was changed in Emacs 30 to have:

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 ;; Also recognize OpenBSD's case X { ... } (bug#55764).
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (and = (looking-at ";\\(?:;&?\\|[&|]\\)\\|\\_<in\\|.{")

where the Emacs 29 had:

=

=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (and (looking-at ";[;&]\= \|\\_<in")

when I modify Emacs = 30 sh-script.el to revert this one line back to the Emacs 29 content, we ge= t the correct answer. I suspect reverting this line is not the right thing = to do. Rather, I hope it helps someone find the solution.

Thanks
John
--000000000000c6a6450633fe59ca-- From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 30 10:07:38 2025 Received: (at 78159) by debbugs.gnu.org; 30 Apr 2025 14:07:38 +0000 Received: from localhost ([127.0.0.1]:43466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uA865-00066J-Lb for submit@debbugs.gnu.org; Wed, 30 Apr 2025 10:07:38 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:44332) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uA7IY-00087K-0W for 78159@debbugs.gnu.org; Wed, 30 Apr 2025 09:16:26 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-736b350a22cso6259700b3a.1 for <78159@debbugs.gnu.org>; Wed, 30 Apr 2025 06:16:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746018978; x=1746623778; darn=debbugs.gnu.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=qfM8jPakkA1sP6bxz0Yr7j8k7kUWByoOpqmSKpIOfd8=; b=ZUsaTd+R9aLwdYDMP2JNFw0oCcGCs1cGlXpDRpqaWDuDQrfyro4ixOSslDwmG6OnEo UEhPoxL28ApYEAdAyX3XdyCMPo4ORgC7NaXv+mG7Uub0fLBt0YNeE/EJikwLKOdcA3af V6j4p2q6Az6IeSb03IZAxFcUUM9RpkUd+O5tEKhp1QQZ31K/wMzh1oONtosebehU7f29 d2dJKQWQ9Tl3KtVytHp0dtWSiKjs1hQOAw8FeqHd8/JpZu2w2GARKG12/jDxDZCDM00f qlqDH8BxFPaEwsFJ/agiQY9PIUaeBLZlUWdiCbmzSE2KpMWybwezffCqP17bo+Bb0uDr /HUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746018978; x=1746623778; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qfM8jPakkA1sP6bxz0Yr7j8k7kUWByoOpqmSKpIOfd8=; b=ohDuQhQcLavE9jouBbBkp/6NYG0gd9RKqzAjjmm7Ksh4sn7kwE7JvCk7EjuYSXmSVn 60EXhpEifEuaZZFb9zkedY20opar50W8MAfiC8MxRMIfBxHorvvWVypiVoyC+3cv1v8w i9ct4n9PpeTM1mZv8sGBzGtVhicAKRxpfoQXEVxdPl/Tjy9V91v0N2wJb3Fmzg5v6TuK lN7GX9E6BWvstINxvKael1AA+wfbUOHGqheNkT4v4Hulcqx+NR8KvdzIYK5oGlP9oejF OoCuakJsbXHGd2vDcIbZRVKYGjoVrCU4v09D+lQe/GEeD+pWgeK47zJpvxX7kdVPBkMT 0tOw== X-Gm-Message-State: AOJu0YwPUzTZca+eqruXWoO2DHULzi+J6mnntcZh9xUGoBoemim9adC3 +d2+yM1Jn5+QeN8ZHR4znBC6FawGvQGB3ChraV1uAb/QUcGoy/ZSzah0SiuZ5RfEvvDSwZ3RvK1 0XMlevj72E2tkyRcWlEEOQWnz8LzsZ+9m X-Gm-Gg: ASbGncsXeyftHPANSjNgdcQ3XZ4AeI+AusorAhauYOj+wWvznDknEW56Tx4dQcHDT8n cRsKfYPFx7OIXxISfZUG+74RHEOZR5wZiBaEnIasSHtQevOpBHs1T7pd4iF9FFWqCMsgQ1Th6/y QIoarYmIMm4PMO3iuOGukzgA== X-Google-Smtp-Source: AGHT+IFsa7irDxf+xrz/5F4fThlrzZHZqRiYwqKfbIDRIb0rmgE6ZRPgc8B/UACmDnPP5g2tkdzomalFSnSz0zA8b5s= X-Received: by 2002:a05:6a20:c88f:b0:1fd:f56f:1cbe with SMTP id adf61e73a8af0-20a87d4e8f3mr4628800637.13.1746018978192; Wed, 30 Apr 2025 06:16:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: John C Date: Wed, 30 Apr 2025 09:15:59 -0400 X-Gm-Features: ATxdqUFtNseqc5PqVWYv-zgGQ1n0xHzzRCusgnGmEw5wdzsjzzEOTPZqfWUWm9M Message-ID: Subject: Re: shell-script indent regression in Emacs 30 To: 78159@debbugs.gnu.org Content-Type: multipart/alternative; boundary="000000000000f762ea0633feb8eb" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 78159 X-Mailman-Approved-At: Wed, 30 Apr 2025 10:07:27 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --000000000000f762ea0633feb8eb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi One more observation is that it's the subshell, code in parens, that's not handled correctly. In the following example, the indentation in haveid3 is incorrect so the issue is not due to the std handle redirects. #!/bin/bash haveid1 () { (id) 2> /dev/null 1>&2 if [ $? -eq 0 ]; then echo "haveid1: yes" else echo "haveid1: no" fi x =3D 1 } haveid2 () { id 2> /dev/null 1>&2 if [ $? -eq 0 ]; then echo "haveid2: yes" else echo "haveid2: no" fi } haveid3 () { (id) if [ $? -eq 0 ]; then echo "haveid2: yes" else echo "haveid2: no" fi } On Wed, Apr 30, 2025 at 8:49=E2=80=AFAM John C w= rote: > Hi > > I debugged this a little and see the regression occurred when > sh-script.el sh-font-lock-paren was changed in Emacs 30 to have: > > ;; Also recognize OpenBSD's case X { ... } (bug#55764= ). > (and (looking-at ";\\(?:;&?\\|[&|]\\)\\|\\_ > where the Emacs 29 had: > > > (and (looking-at ";[;&]\\|\\_ > when I modify Emacs 30 sh-script.el to revert this one line back to the > Emacs 29 content, we get the correct answer. I suspect reverting this lin= e > is not the right thing to do. Rather, I hope it helps someone find the > solution. > > Thanks > John > --000000000000f762ea0633feb8eb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

One more observation is that it'= s the subshell, code in parens, that's not handled correctly. In the fo= llowing example, the indentation in haveid3 is incorrect so the issue is no= t due to the std handle redirects.

#!/bin/bash

haveid1 () {
=C2=A0 =C2=A0 (id) 2> /dev/= null 1>&2
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if [ $? -eq 0 ]; then=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0echo "haveid1: yes= "
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0else
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0echo "haveid1: no"
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0fi
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0x =3D 1
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
}

haveid2 () {
=C2=A0 =C2=A0 i= d 2> /dev/null 1>&2
=C2=A0 =C2=A0 if [ $? -eq 0 ]; then
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 echo "haveid2: yes"
=C2=A0 =C2=A0 els= e
=C2=A0 =C2=A0 =C2=A0 =C2=A0 echo "haveid2: no"
=C2=A0 =C2= =A0 fi
}

haveid3 () {
=C2=A0 =C2=A0 (id)
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 if [ $? -eq 0 ]; then
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 echo "haveid2: yes"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 else
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 echo "haveid2: no"
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 fi
}



--000000000000f762ea0633feb8eb-- From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 30 10:23:24 2025 Received: (at 78159) by debbugs.gnu.org; 30 Apr 2025 14:23:24 +0000 Received: from localhost ([127.0.0.1]:43531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uA8LM-0006v5-5z for submit@debbugs.gnu.org; Wed, 30 Apr 2025 10:23:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49724) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uA8LB-0006ua-Tz for 78159@debbugs.gnu.org; Wed, 30 Apr 2025 10:23:19 -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 ) id 1uA8L5-0006Z8-SX; Wed, 30 Apr 2025 10:23:07 -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=1s2IS6W7YexiqtZHcqiaw8G2EnM7z5tOZNQ4JaE1+Ec=; b=UGgS51VDODTz iBlOIM8hYtOULurTdsHg/XKJZ2zzG8H568NOAYTkql4+EnMh3PNedUTYDaiHBQtXFt+XUvMj7oxVc cEUsHPobQqiWpYhGZ/XkG115g1RU0u2JUV75hdaWw9B2cgTuBIdfG6rLkGQevJf5+jMsb6xtAnaL9 yXFTM1QbPDfH8aD3+WXQWDzKCdxQY9QG1mNUa8Fe3+Im7K7xZNVwjwxaEdbPec5zHCEKJ/OL1XsAs 02To47slSJ3DJoTR8kkBApGgs+AfVFoxXFDIO6tHKi0t8HTr/DJVoMyKqiXHok3L/BQ1Lbure9047 EwbsIwdf7daGVRvbBKwOhA==; Date: Wed, 30 Apr 2025 17:23:03 +0300 Message-Id: <86y0vhn2yg.fsf@gnu.org> From: Eli Zaretskii To: John C , Stefan Monnier In-Reply-To: (message from John C on Wed, 30 Apr 2025 08:49:28 -0400) Subject: Re: bug#78159: shell-script indent regression in Emacs 30 References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78159 Cc: 78159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: John C > Date: Wed, 30 Apr 2025 08:49:28 -0400 > > I debugged this a little and see the regression occurred when sh-script.el sh-font-lock-paren was changed > in Emacs 30 to have: > > ;; Also recognize OpenBSD's case X { ... } (bug#55764). > (and (looking-at ";\\(?:;&?\\|[&|]\\)\\|\\_ > where the Emacs 29 had: > > (and (looking-at ";[;&]\\|\\_ > when I modify Emacs 30 sh-script.el to revert this one line back to the Emacs 29 content, we get the correct > answer. I suspect reverting this line is not the right thing to do. Rather, I hope it helps someone find the > solution. Stefan, any suggestions? From debbugs-submit-bounces@debbugs.gnu.org Thu May 01 17:25:09 2025 Received: (at 78159) by debbugs.gnu.org; 1 May 2025 21:25:09 +0000 Received: from localhost ([127.0.0.1]:53792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uAbP3-000433-4j for submit@debbugs.gnu.org; Thu, 01 May 2025 17:25:09 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:14342) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uAbOz-0003yl-VJ for 78159@debbugs.gnu.org; Thu, 01 May 2025 17:25:07 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 074AF8000E; Thu, 1 May 2025 17:25:00 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1746134695; bh=LhBT1EhFxXJ1CvJNihS7aiOInH0ljvb+Afykdl37rBY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=JIabs6VETwFBbLvODfFsOPRQSSk8Ocju3/oXpD05026ecYEWCtT0U/lk4DoliQNBp Qz+ljwp9RkZkmDLPWRlG1Pc5gTlpXdI7TOT0GD7ILlX3VkQy2XRHJyQ0ezjpar1II2 dvSp0TH9wtC4wrP5TuMYDsgUT1GoL9UgpRCKcTF1qq354oKf7AudAsPSZnGR3PXVwS cDfF9YXLnnVNzs1kNp6dYB2JRWQaPjsuHFrHZ5pJi5Q76bvtJHzXJWIGbK+sPQByUa Tn7CufKnvteYF6wDPPnLOGMeiyALvjyvWB3tlPaX+NNnykaIUNI97RrFFG+bYaybvv a5I2IvNMo1Fqg== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id EFE178060A; Thu, 1 May 2025 17:24:54 -0400 (EDT) Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id DF7C11203B3; Thu, 1 May 2025 17:24:54 -0400 (EDT) From: Stefan Monnier To: John Ciolfi Subject: Re: bug#78159: shell-script indent regression in Emacs 30 In-Reply-To: Message-ID: References: Date: Thu, 01 May 2025 17:24:54 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.054 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain KAM_NUMSUBJECT 0.5 Subject ends in numbers excluding current years X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78159 Cc: 78159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > > haveid1 () { > (id) 2> /dev/null 1>&2 > if [ $? -eq 0 ]; then > echo "haveid1: yes" > else > echo "haveid1: no" > fi > } > > haveid2 () { > id 2> /dev/null 1>&2 > if [ $? -eq 0 ]; then > echo "haveid2: yes" > else > echo "haveid2: no" > fi > } Oh, yes, it's due to the change to accept: case FOO { (id) ...;; (other) ...;; } The previous code accepted only case FOO in (id) ...;; (other) ...;; esac and it checked only the presence of `in` without checking that it's part of a case statement, which was sufficient because `in` doesn't seem to ever occur elsewhere than in case statements. The new code similarly fails to check that the `{` is part of a case statement but `{` doesn't enjoy this same property as `in`, hence the bug you're seeing. A crude hack could be something like the patch below, but we should try to do a more thorough job of deciding if this `{` is part of case statement or not. Stefan diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 287f0501350..b5ccc5507e5 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1065,14 +1065,19 @@ sh-font-lock-paren ;; a normal command rather than the real `in' keyword. ;; I.e. we should look back to try and find the ;; corresponding `case'. - ;; Also recognize OpenBSD's case X { ... } (bug#55764). - (and (looking-at ";\\(?:;&?\\|[&|]\\)\\|\\_) id 1uCuha-0008UL-9h for submit@debbugs.gnu.org; Thu, 08 May 2025 02:25:51 -0400 Received: from mail-yw1-x112b.google.com ([2607:f8b0:4864:20::112b]:61686) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uCkkl-0002CU-98 for 78159@debbugs.gnu.org; Wed, 07 May 2025 15:48:28 -0400 Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-708b3cc144cso2654037b3.2 for <78159@debbugs.gnu.org>; Wed, 07 May 2025 12:48:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746647301; x=1747252101; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=u8xrmW6/oolgxlqsrNFVMzou+DbCvYj0+Hvy94YxsME=; b=I0qtc2D1xt2wLMV8emxIcNoLhVlyQScJoMKa1X5kmN240I+BbL+aRg8B52uIEWmMU9 TbLdj1Uj0dKVlZpFOex0mfYTm8N557tRX6NmyIe44vEb9R+PF3jv+ggktzzRJVHJc/T6 012VBc97Oe0k/VT3sbDR/8YXZqz+nK3TWJNYT6EuYaZwig5VhwwXKpPdGiP8RUd2k4w3 VIX/37I+wJFF0/qhvRkno3WYEUz/YTKraesgpCjrFTqOQ9mlOd0Zhqh/cwgghDtpVMcy ft4sQXQ78vWj6vILNz2cCzNY7xj9Nw/z4wa+lh71vMJ1sVufRT+PtLg+aoSJzHfU8yt4 lMdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746647301; x=1747252101; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=u8xrmW6/oolgxlqsrNFVMzou+DbCvYj0+Hvy94YxsME=; b=ARKXHOBhEnvNjnDAaAoBMoUZVCoLjNPz6ceHDR/d8tJ7PhsNcBrBnSgv+lo0lNYfNZ WTMnAShPVgqSQlZnJovAI8bOwAWAiYynEmIUxkAGxWP3NtdkH/bKL3J27WhMAhhFNy4L +dYGnoFWy2Y5XDkk3qmmb7md4i3+bvKf3bGIdeGpYt9Z37hsvDpFBC9Xs04pMiHU2ull oPyRc1GlRGwpEUa+xtYsL4f9paVksPNzyFk9K5vpVYQFi0VnyMyB13YyW1i87EzySufM hCktVRvSi3+ni2DJGCry1stCynmvhRVK9c104xLUUmaUwwe7CoJkqKf39G7e4bx0G3Wm 4R/Q== X-Gm-Message-State: AOJu0YzIlz7fXqP+IGfSVSICG0s302kFoXdk1iaHfTk/8hDUyJWhKktV I/bI66mBt90/FaGiol7xC0xPOMk25gaimFZF7DvyLyo78/8rQrRThzuXr/V8URgg8f6wqeR6Cid RtZ/qoMI2LgK/UYK9uebAYJgQnDxWcHdd X-Gm-Gg: ASbGnctEmDNnqm6gShO6OV8gFWGIKRFyB6LQV+WU4286cLbtr4IvtesiDWuUsEIfaF8 imXuIJl+ZfeDJnZt4nAHXAhh5yhXxkCxUFzgm+XNurj3hClunso6+xt72FM1NJ2kcYxpTdTxLW+ l8YC5pj4DWcHt2zpSsx8fJ2w== X-Google-Smtp-Source: AGHT+IHTB0xSr595Wy2END9dx87N69qF9rW0J+zNld1Z7t3qjzbZdZ7Qqlb+0erxuqhRakvwHxCwor8puk9Xa2hE7kQ= X-Received: by 2002:a05:690c:7009:b0:703:b278:db2d with SMTP id 00721157ae682-70a2cee9898mr12289477b3.12.1746647300965; Wed, 07 May 2025 12:48:20 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: John C Date: Wed, 7 May 2025 15:48:09 -0400 X-Gm-Features: ATxdqUH-no2HPnscA9Dfgm4w-yQmpfZpDj46OjrSt3EnlRup3ZNKtOpaPWahE4c Message-ID: Subject: Re: bug#78159: shell-script indent regression in Emacs 30 To: Stefan Monnier Content-Type: multipart/alternative; boundary="000000000000ec0bcb06349103ba" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 78159 X-Mailman-Approved-At: Thu, 08 May 2025 02:25:48 -0400 Cc: 78159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --000000000000ec0bcb06349103ba Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I tried the patch on Emacs 30.1 sh-script.el and it doesn't seem to work? Here's what I get: #!/bin/bash haveid1 () { (id) 2> /dev/null 1>&2 if [ $? -eq 0 ]; then echo "haveid1: yes" else echo "haveid1: no" fi } haveid2 () { id 2> /dev/null 1>&2 if [ $? -eq 0 ]; then echo "haveid2: yes" else echo "haveid2: no" fi } haveid3 () { (id) if [ $? -eq 0 ]; then echo "haveid1: yes" else echo "haveid1: no" fi } On Thu, May 1, 2025 at 5:25=E2=80=AFPM Stefan Monnier wrote: > > > > haveid1 () { > > (id) 2> /dev/null 1>&2 > > if [ $? -eq 0 ]; then > > echo "haveid1: yes" > > else > > echo "haveid1: no" > > fi > > } > > > > haveid2 () { > > id 2> /dev/null 1>&2 > > if [ $? -eq 0 ]; then > > echo "haveid2: yes" > > else > > echo "haveid2: no" > > fi > > } > > Oh, yes, it's due to the change to accept: > > case FOO { > (id) ...;; > (other) ...;; > } > > The previous code accepted only > > case FOO in > (id) ...;; > (other) ...;; > esac > > and it checked only the presence of `in` without checking that it's part > of a case statement, which was sufficient because `in` doesn't seem to > ever occur elsewhere than in case statements. > > The new code similarly fails to check that the `{` is part of a case > statement but `{` doesn't enjoy this same property as `in`, hence the > bug you're seeing. > > A crude hack could be something like the patch below, but we should try > to do a more thorough job of deciding if this `{` is part of case > statement or not. > > > Stefan > > > diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el > index 287f0501350..b5ccc5507e5 100644 > --- a/lisp/progmodes/sh-script.el > +++ b/lisp/progmodes/sh-script.el > @@ -1065,14 +1065,19 @@ sh-font-lock-paren > ;; a normal command rather than the real `in' keywor= d. > ;; I.e. we should look back to try and find the > ;; corresponding `case'. > - ;; Also recognize OpenBSD's case X { ... } > (bug#55764). > - (and (looking-at ";\\(?:;&?\\|[&|]\\)\\|\\_ - ;; ";; esac )" is a case that looks > - ;; like a case-pattern but it's really just a > close > - ;; paren after a case statement. I.e. if we > skipped > - ;; over `esac' just now, we're not looking > - ;; at a case-pattern. > - (not (looking-at "..[ \t\n]+esac[^[:word:]_]"))= )) > + (cond > + ((looking-at ";\\(?:;&?\\|[&|]\\)\\|\\_ + ;; ";; esac )" is a case that looks > + ;; like a case-pattern but it's really just a clos= e > + ;; paren after a case statement. I.e. if we skipp= ed > + ;; over `esac' just now, we're not looking > + ;; at a case-pattern. > + (not (looking-at "..[ \t\n]+esac[^[:word:]_]"))) > + ;; Also recognize OpenBSD's case X { ... } > (bug#55764). > + ((looking-at ".{") > + (save-excursion > + ;; Try and make sure this is a case statement! > + (re-search-backward "esac" (pos-bol) t))))) > (progn > (when open > (put-text-property open (1+ open) 'syntax-table > sh-st-punc)) > > --000000000000ec0bcb06349103ba Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I tried the patch on Emacs 30.1 sh-script.el and it doesn&= #39;t seem=C2=A0to work? Here's what I get:

#!/bin/bash

haveid1 () {
=C2=A0 =C2=A0 (id) 2>= ; /dev/null 1>&2
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if [ $? -eq 0 = ]; then
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0echo "havei= d1: yes"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0else
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0echo "haveid1: no"
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0fi
}

haveid2 () {
=C2=A0 =C2=A0 id = 2> /dev/null 1>&2
=C2=A0 =C2=A0 if [ $? -eq 0 ]; then
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 echo "haveid2: yes"
=C2=A0 =C2=A0 els= e
=C2=A0 =C2=A0 =C2=A0 =C2=A0 echo "haveid2: no"
=C2=A0 =C2= =A0 fi
}

haveid3 () {
=C2=A0 =C2=A0 (id)
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 if [ $? -eq 0 ]; then
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 echo "haveid1: yes"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 else
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 echo "haveid1: no"
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 fi
}


--000000000000ec0bcb06349103ba--
=
>
> haveid1 () {
>=C2=A0 =C2=A0 =C2=A0(id) 2> /dev/null 1>&2
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 if [ $? -eq 0 ]; then
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 echo "haveid1: ye= s"
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 else
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 echo "haveid1: no= "
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 fi
> }
>
> haveid2 () {
>=C2=A0 =C2=A0 =C2=A0id 2> /dev/null 1>&2
>=C2=A0 =C2=A0 =C2=A0if [ $? -eq 0 ]; then
>=C2=A0 =C2=A0 =C2=A0 =C2=A0echo "haveid2: yes"
>=C2=A0 =C2=A0 =C2=A0else
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0echo "haveid2: no"
>=C2=A0 =C2=A0 =C2=A0fi
> }

Oh, yes, it's due to the change to accept:

=C2=A0 =C2=A0 case FOO {
=C2=A0 =C2=A0 =C2=A0 (id) ...;;
=C2=A0 =C2=A0 =C2=A0 (other) ...;;
=C2=A0 =C2=A0 }

The previous code accepted only

=C2=A0 =C2=A0 case FOO in
=C2=A0 =C2=A0 =C2=A0 (id) ...;;
=C2=A0 =C2=A0 =C2=A0 (other) ...;;
=C2=A0 =C2=A0 esac

and it checked only the presence of `in` without checking that it's par= t
of a case statement, which was sufficient because `in` doesn't seem to<= br> ever occur elsewhere than in case statements.

The new code similarly fails to check that the `{` is part of a case
statement but `{` doesn't enjoy this same property as `in`, hence the bug you're seeing.

A crude hack could be something like the patch below, but we should try
to do a more thorough job of deciding if this `{` is part of case
statement or not.


=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan


diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 287f0501350..b5ccc5507e5 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1065,14 +1065,19 @@ sh-font-lock-paren
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0;; a normal command rather than the real `in' keyword.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0;; I.e. we should look back to try and find the
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0;; corresponding `case'.
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; A= lso recognize OpenBSD's case X { ... } (bug#55764).
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (and= (looking-at ";\\(?:;&?\\|[&|]\\)\\|\\_<in\\|.{")
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0;; ";; esac )" is a case that looks
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0;; like a case-pattern but it's really just a close -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0;; paren after a case statement.=C2=A0 I.e. if we skipped<= br> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0;; over `esac' just now, we're not looking
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0;; at a case-pattern.
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(not (looking-at "..[ \t\n]+esac[^[:word:]_]")))= )
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (con= d
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0((looking-at ";\\(?:;&?\\|[&|]\\)\\|\\_<in")
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 ;; ";; esac )" is a case that looks
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 ;; like a case-pattern but it's really just a close
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 ;; paren after a case statement.=C2=A0 I.e. if we skipped
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 ;; over `esac' just now, we're not looking
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 ;; at a case-pattern.
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 (not (looking-at "..[ \t\n]+esac[^[:word:]_]")))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0;; Also recognize OpenBSD's case X { ... } (bug#55764).
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0((looking-at ".{")
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 (save-excursion
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 ;; Try and make sure this is a case statement!
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 (re-search-backward "esac" (pos-bol) t)))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (progn
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (when open
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (put-text-pr= operty open (1+ open) 'syntax-table sh-st-punc))