From unknown Thu Sep 11 17:28:40 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#55764 <55764@debbugs.gnu.org> To: bug#55764 <55764@debbugs.gnu.org> Subject: Status: 29.0.50; sh-mode: Support mksh's alternate case brace syntax Reply-To: bug#55764 <55764@debbugs.gnu.org> Date: Fri, 12 Sep 2025 00:28:40 +0000 retitle 55764 29.0.50; sh-mode: Support mksh's alternate case brace syntax reassign 55764 emacs submitter 55764 Visuwesh severity 55764 wishlist tag 55764 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 02 09:34:07 2022 Received: (at submit) by debbugs.gnu.org; 2 Jun 2022 13:34:07 +0000 Received: from localhost ([127.0.0.1]:53153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwkxj-0001Fu-II for submit@debbugs.gnu.org; Thu, 02 Jun 2022 09:34:07 -0400 Received: from lists.gnu.org ([209.51.188.17]:37836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwkxi-0001Fn-Bz for submit@debbugs.gnu.org; Thu, 02 Jun 2022 09:34:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwkxh-0006h1-Jr for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2022 09:34:06 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:39457) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nwkxd-0001Tt-Tf for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2022 09:34:03 -0400 Received: by mail-pl1-x642.google.com with SMTP id o17so4544183pla.6 for ; Thu, 02 Jun 2022 06:34:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:user-agent:mime-version; bh=qj6h7rSSPWFJetNFB51VE7L/peXA1VDLl7wDC+wavGw=; b=RPAEqKvWVzORe2d2LdCWR2bUlMOn0qplRmr+KmXZoOExSbYaF1mW0imI7Kgz6GLQ+n GAnSpKoPrUGgLotLCtqHkqlqTS7VpaBnJ2UPLu9gbBk6mte3tDdx47ld9+LvFIb6vFqL K5lq/1am1BDXS5HPBnIvDAW/r0LKPzjf1EgLU6AE0JVkvR6sFZlUGci8tKrjpcpd/qMY DhLecleQGv354s0voWuxH7HYQYYQ2d6cpDMrOhtQ3lgZlYmLdZRTZ7c41vJXz4lzTCF8 RRxYGf/MOyM4/BM0buYelmPr9mj7w0j8iaTMauo9hvYMrDLqKkBvVVlMH0LhRiyeuqtj uRmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=qj6h7rSSPWFJetNFB51VE7L/peXA1VDLl7wDC+wavGw=; b=NXO7Zj/W7612KxfNzBqhixXEq3cjoytcQSZCSasls33UFxFzBRKcum9e1ji3ugH4ER WgIrvLExgOmXD2f/55synpxZ9tSgtQOuRFqfXaDlPhjw/tiKNM6M6AavNab6X4FeMFUH Dry0lHFAyzh8XE3XXD0HoPVVq25nuvqZCSjhkZsG+M840lbn6AV6aFFfYcHql4cmji1N xSQo7HRk3nxjXwEiWqjzT5/d14deaeGpd/O/HQhJGgLtAQ583WsCrVKi0lFMZsE0u9mU EWH+x+KswfESJRf3jpMildiR2nBpzCls/8ARMAqOSsP/ODZC51iDPdAuA71EerRI92nB q3nA== X-Gm-Message-State: AOAM531gkkx6JZ7fSV5O5Qh5mQ5SaTeZd8XcapLXqrdFmfFsqOrrzDu+ AB/TTsCrr8eYrNly0A1A9Fd2dsEuzbg= X-Google-Smtp-Source: ABdhPJzGGC7eh+JJcGowzRN3nqDBeWnpnd9QcKopzxsj2173g32PTLhO3InZHL7kEXDYW44ySM0aPQ== X-Received: by 2002:a17:90a:2807:b0:1e6:7eef:8e9d with SMTP id e7-20020a17090a280700b001e67eef8e9dmr5134520pjd.109.1654176840011; Thu, 02 Jun 2022 06:34:00 -0700 (PDT) Received: from localhost ([49.204.135.220]) by smtp.gmail.com with ESMTPSA id m10-20020a170902db0a00b0015ee985999dsm3592932plx.97.2022.06.02.06.33.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jun 2022 06:33:57 -0700 (PDT) From: Visuwesh To: bug-gnu-emacs@gnu.org Subject: 29.0.50; sh-mode: Support mksh's alternate case brace syntax Date: Thu, 02 Jun 2022 19:03:47 +0530 Message-ID: <87o7zbp4uc.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::642; envelope-from=visuweshm@gmail.com; helo=mail-pl1-x642.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit 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: -2.3 (--) --=-=-= Content-Type: text/plain mksh and OpenBSD's ksh support an alternative case syntax for historical reasons [1], case $i { *pattern) do ;; *pattern2) do2 ;; } Currently, sh-mode cannot handle this and the easy way out of writing a semicolon after $i is out since, % case "foo"; { *o) echo 1;; } /bin/mksh: syntax error: unexpected ';' I came with the attached patch after a bit of trial and error but I'm not sure if it is the right way to do it. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=mksh-braces.patch diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 4d2554c087..588d9038e5 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1971,9 +1971,10 @@ (sh-var-value 'sh-indent-for-case-label))) (`(:before . ,(or "(" "{" "[" "while" "if" "for" "case")) (cond - ((and (equal token "{") (smie-rule-parent-p "for")) + ((and (equal token "{") (or (smie-rule-parent-p "for") + (smie-rule-parent-p "case"))) (let ((data (smie-backward-sexp "in"))) - (when (equal (nth 2 data) "for") + (when (member (nth 2 data) '("for" "case")) `(column . ,(smie-indent-virtual))))) ((not (smie-rule-prev-p "&&" "||" "|")) (when (smie-rule-hanging-p) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable -- [1] Here's what the mksh manual says, For historical reasons, open and close braces may be used instead of in and esac, for example: =E2=80=9Ccase $foo { (ba[rz]|blah) date ;;= }=E2=80=9D and OpenBSD's ksh manual says, For historical reasons, open and close braces may be used instead of in and esac e.g. case $foo { *) echo bar; }. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 02 09:40:23 2022 Received: (at 55764) by debbugs.gnu.org; 2 Jun 2022 13:40:23 +0000 Received: from localhost ([127.0.0.1]:53187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwl3n-0001SJ-0k for submit@debbugs.gnu.org; Thu, 02 Jun 2022 09:40:23 -0400 Received: from quimby.gnus.org ([95.216.78.240]:51404) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwl3l-0001Rz-RN for 55764@debbugs.gnu.org; Thu, 02 Jun 2022 09:40:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=PGfpmo1SKuCWidtaOVbc5Zfb8Vd9j0F4o5QxRSUFpB4=; b=TbCIfsvuSPSk26PYg5KPHtkYPB b67bm9gClhpMKJJskio1E2ybvQXrTM57yrBSBF3YipYAoNcT32Vx4VgOj9ibao2GI3Nfvw8VkuflQ TNjjI1eVLwmBBCXtKj2Iq3YvkUscO1Y7QUzdeaou59JWS05GtjH6RxdKTV9XBjTpJmfg=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nwl3b-0008Qj-DM; Thu, 02 Jun 2022 15:40:13 +0200 From: Lars Ingebrigtsen To: Visuwesh Subject: Re: bug#55764: 29.0.50; sh-mode: Support mksh's alternate case brace syntax References: <87o7zbp4uc.fsf@gmail.com> Date: Thu, 02 Jun 2022 15:40:08 +0200 In-Reply-To: <87o7zbp4uc.fsf@gmail.com> (Visuwesh's message of "Thu, 02 Jun 2022 19:03:47 +0530") Message-ID: <87o7zbw5dz.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.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 @@CONTACT_ADDRESS@@ for details. Content preview: Visuwesh writes: > mksh and OpenBSD's ksh support an alternative case syntax for historical > reasons [1], > > case $i { > *pattern) do ;; > *pattern2) do2 ;; > } > > Currently, sh-mode cannot handle this and the easy [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55764 Cc: 55764@debbugs.gnu.org, Stefan Monnier 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 (---) Visuwesh writes: > mksh and OpenBSD's ksh support an alternative case syntax for historical > reasons [1], > > case $i { > *pattern) do ;; > *pattern2) do2 ;; > } > > Currently, sh-mode cannot handle this and the easy way out of writing a > semicolon after $i is out since, > > % case "foo"; { *o) echo 1;; } > /bin/mksh: syntax error: unexpected ';' > > I came with the attached patch after a bit of trial and error but I'm > not sure if it is the right way to do it. I think that might make sense, but perhaps Stefan has some comments here (added to the CCs). -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 02 10:01:31 2022 Received: (at 55764) by debbugs.gnu.org; 2 Jun 2022 14:01:31 +0000 Received: from localhost ([127.0.0.1]:54346 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwlOF-0002Lk-2A for submit@debbugs.gnu.org; Thu, 02 Jun 2022 10:01:31 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:40635) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwlOD-0002LW-FL for 55764@debbugs.gnu.org; Thu, 02 Jun 2022 10:01:29 -0400 Received: by mail-pf1-f195.google.com with SMTP id z17so4835987pff.7 for <55764@debbugs.gnu.org>; Thu, 02 Jun 2022 07:01:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=J24xUZcFQ6uHYiqQxa91VUqCnO7ugSToxPx7wuPH/Oc=; b=Tt938TlqrqtibBR8IsoyZkSy5ljJyojbL4cnyiu2oLfaNbyG/T7KknLbgIcEq2/EDR Qknmv7WFtY8v41haflupofnSW32RHcaPNRxMIkCl0bffY2RMPUHf0RlDzH+ePHf/ZY7L JyFGD/aqSsM8bk6RDQof+tgdOvStMXz38hFPq8WiGrBBPWe5OGtS2ER6r0JQ0W7nqf5l kptyLxpd1nK691QWHP2X3J8aMj0y5gzl2CBeciSf1yMOXOeS4Kn3DnHZzwotIURvL29q 4Bm9pqb0IwEFbqlK2OiEYMwcXGL4p0KGOh47as48OCEZsdNWkRfSMdOUMLgrlZsAFHRS USMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=J24xUZcFQ6uHYiqQxa91VUqCnO7ugSToxPx7wuPH/Oc=; b=FN9h462+nXf25lfoVoVBRXnpUnl9yJhUm4H6JVbOZYYXnQeli0keZ5eGxeE2nt/uF0 09k6GMspOG0tDUGAmyDB1dWs3OQwmc+/Thv7CyULlAIGNPHXHhdLbx01a9OotpKMdcaP BPdRCaxlJPfbZwq70Q1Chc5KAFZVLcsVxAt64A6ECErU0+QtAiMxrFugNgULw/1v5G+7 +qmKR1v/Wg5UpDJYnVRmohdRriTYJaQfo1mPTAr4tLCEIgy6Rjl+VY8RjbNB1JWAP+rk 1cw++emELVhQtizNlk+30QQ0aPaXXTkEcLe1ymbubFtaa5Hp94H6cjjfqj8iRRNVUyhr +NCw== X-Gm-Message-State: AOAM532e5NVDYh4tqNuCYaFxrOop86HsVBUPIyS1Ws9NwxkhwI0X1goV ayR0CvJbJyk+tcxzFdWOEno= X-Google-Smtp-Source: ABdhPJzXhjm9t2ir9HPJYOIJFrfbj8d8Y5CkS4TMFMy3uPJyGhoyB2x0zAl2Z/bKe/l0HVX7ucbpxw== X-Received: by 2002:a63:4d0:0:b0:3fc:4f01:dac6 with SMTP id 199-20020a6304d0000000b003fc4f01dac6mr4451214pge.263.1654178483601; Thu, 02 Jun 2022 07:01:23 -0700 (PDT) Received: from localhost ([49.204.135.220]) by smtp.gmail.com with ESMTPSA id j187-20020a638bc4000000b003db822e2170sm3418304pge.23.2022.06.02.07.01.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jun 2022 07:01:22 -0700 (PDT) From: Visuwesh To: Lars Ingebrigtsen Subject: Re: bug#55764: 29.0.50; sh-mode: Support mksh's alternate case brace syntax References: <87o7zbp4uc.fsf@gmail.com> <87o7zbw5dz.fsf@gnus.org> Date: Thu, 02 Jun 2022 19:31:18 +0530 In-Reply-To: <87o7zbw5dz.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 02 Jun 2022 15:40:08 +0200") Message-ID: <87k09zp3kh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 55764 Cc: 55764@debbugs.gnu.org, Stefan Monnier 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: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable [=E0=AE=B5=E0=AE=BF=E0=AE=AF=E0=AE=BE=E0=AE=B4=E0=AE=A9=E0=AF=8D =E0=AE=9C= =E0=AF=82=E0=AE=A9=E0=AF=8D 02, 2022] Lars Ingebrigtsen wrote: > Visuwesh writes: > >> mksh and OpenBSD's ksh support an alternative case syntax for historical >> reasons [1], >> >> case $i { >> *pattern) do ;; >> *pattern2) do2 ;; >> } >> >> Currently, sh-mode cannot handle this and the easy way out of writing a >> semicolon after $i is out since, >> >> % case "foo"; { *o) echo 1;; } >> /bin/mksh: syntax error: unexpected ';' >> >> I came with the attached patch after a bit of trial and error but I'm >> not sure if it is the right way to do it. > > I think that might make sense, but perhaps Stefan has some comments here > (added to the CCs). To no one's surprise, the patch is not the right approach. IIUC, when I use braces, *pattern) thingies are not recognised as "case-)" anymore so sh-indent-for-case-label does not get applied. I tried a bit more but I only got it to respect the first line but still it is definitely not the right approach, --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=mksh-braces.patch diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 4d2554c087..96ff8e8627 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1971,9 +1971,9 @@ sh-smie-sh-rules (sh-var-value 'sh-indent-for-case-label))) (`(:before . ,(or "(" "{" "[" "while" "if" "for" "case")) (cond - ((and (equal token "{") (smie-rule-parent-p "for")) + ((and (equal token "{") (smie-rule-parent-p "for" "case")) (let ((data (smie-backward-sexp "in"))) - (when (equal (nth 2 data) "for") + (when (member (nth 2 data) '("for" "case")) `(column . ,(smie-indent-virtual))))) ((not (smie-rule-prev-p "&&" "||" "|")) (when (smie-rule-hanging-p) @@ -2021,10 +2021,13 @@ sh-smie-sh-rules ('(:after . "in") (sh-var-value 'sh-indent-for-case-label)) ;; sh-indent-for-continuation: Line continuations are handled differently. (`(:after . ,(or "(" "{" "[")) - (if (not (looking-at ".[ \t]*[^\n \t#]")) - (sh-var-value 'sh-indent-after-open) - (goto-char (1- (match-end 0))) - `(column . ,(current-column)))) + (cond + ((smie-rule-parent-p "case") + (sh-var-value 'sh-indent-for-case-label)) + ((not (looking-at ".[ \t]*[^\n \t#]")) + (sh-var-value 'sh-indent-after-open)) + (t (goto-char (1- (match-end 0))) + `(column . ,(current-column))))) ;; sh-indent-after-function: we don't handle it differently. )) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 19 09:53:29 2022 Received: (at control) by debbugs.gnu.org; 19 Jun 2022 13:53:29 +0000 Received: from localhost ([127.0.0.1]:50981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2vMn-00005b-5X for submit@debbugs.gnu.org; Sun, 19 Jun 2022 09:53:29 -0400 Received: from mail-pl1-f169.google.com ([209.85.214.169]:43746) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2vMj-0008WR-CW for control@debbugs.gnu.org; Sun, 19 Jun 2022 09:53:27 -0400 Received: by mail-pl1-f169.google.com with SMTP id r1so7600532plo.10 for ; Sun, 19 Jun 2022 06:53:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:mime-version:date:message-id:subject:to; bh=JdedM2wEHaFHsJ0Hce/dugQo/VxEhj7/aiIY1jW1ed0=; b=UwlFix8lQ9jPeI1MdmA5pS/8dtdu5EPxQFm6W9O+khWL6QnaWem+nVXE1QlD2LIWKk zCFR8Oc0hODaTja2Pe2m4vLc7VSsYfnX+crp/eXFXLxnCr6i3vw8TEKwaU/ZvHVNBodj 4rpwCHGl0k7F6Opd9kTtznoQrn86AbXF3fg7RYFei0U8KAwzc2MirsfhmsYMVWyY0V2l H6uSLc8X1rqoiSKE8/7/2IMZ+4I446fZlKNXZVDsFY1SJWitanqKwB1z2vxi1xk7w/b0 xqE8muBP3In5JbGPK4jy1BrODwiXFKrrJCe5ya0bwdTQP/e65cy7Ppb+ssWHkuFe9srQ J+Jw== X-Gm-Message-State: AJIora+t8ZB6z35Ss4f3VAP/Rw194tg6mjIQHSgrT+DKSS/MI00BIwB5 zPoOmvRAv0t85w6mQV0T8q4Nx+IiE8rq6dsVEnSwHrog X-Google-Smtp-Source: AGRyM1ve5Fbk+7jdFhuNIRC5UjRoeD8CYoKCAQ9p1fRh1yfzjF9cBsWe5tbW3kShwbTGzAL02NDI2u2ZkDg0o3ZikjI= X-Received: by 2002:a17:90b:4d8b:b0:1e3:31df:c98a with SMTP id oj11-20020a17090b4d8b00b001e331dfc98amr32343835pjb.175.1655646799664; Sun, 19 Jun 2022 06:53:19 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 19 Jun 2022 06:53:19 -0700 From: Stefan Kangas MIME-Version: 1.0 Date: Sun, 19 Jun 2022 06:53:19 -0700 Message-ID: Subject: control message for bug #55764 To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: control 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.5 (/) severity 55764 wishlist quit From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 28 17:20:27 2022 Received: (at control) by debbugs.gnu.org; 28 Jun 2022 21:20:27 +0000 Received: from localhost ([127.0.0.1]:56492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o6IdH-0006Da-Mu for submit@debbugs.gnu.org; Tue, 28 Jun 2022 17:20:27 -0400 Received: from mail-pf1-f180.google.com ([209.85.210.180]:35441) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o6IdC-0006Cn-EO for control@debbugs.gnu.org; Tue, 28 Jun 2022 17:20:25 -0400 Received: by mail-pf1-f180.google.com with SMTP id x4so13159261pfq.2 for ; Tue, 28 Jun 2022 14:20:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:mime-version:date:message-id:subject:to; bh=0xxkmrpFO37I0ROrGZx4TLQxXcmMs2UfFZ2mjz6U+Xg=; b=Xn0TJOnhi8SCAtLkCB9fNSiHcMxBYvhxju5O6dLnzyxEYfMG917lSjLLYBY3q4i/Y/ t6Z3zQ4S/kICyqVRwYnjdJZ8Gs2cmq5PNbZ47o7wsenfPpY1y3dmHooY1lIEvjeKgX02 r8C7X0dICN3LkZc1zSMj1083z9L8usene10RzTsxtFqPm4YysQo0VpypI6nViKVJQz7T Z2KEwtsz5UI1GJOP/1S1wAWfitoTWPaOau54QkhIIo2qlwSKti/NweZL21VQ9bsTEPz9 cVSBwVL1mcbf+2TFxHm65IzbDVHVZQJTGhV+NZjpnt+zP85nxVghsc3heCX5/FTjRkug JBeA== X-Gm-Message-State: AJIora+G8ACXvUVut9C1zbN5TmJUDzonvSiOBICyZTTa2Oa1mWllQE2e Uyj7OYCNCXaULS3irGYFkAkPXlG71FVXUl6PKnsoWvcg X-Google-Smtp-Source: AGRyM1vuyPhw2Od7Dg0Z+iemCwSUrbrfarDfQdLR3mAsQHBtdtnTO8RhLVXCnnQ7amRb/SluaZPBmnvtCoatG5vSN3k= X-Received: by 2002:a63:ed48:0:b0:40d:9866:6834 with SMTP id m8-20020a63ed48000000b0040d98666834mr19059008pgk.324.1656451216655; Tue, 28 Jun 2022 14:20:16 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 28 Jun 2022 14:20:16 -0700 From: Stefan Kangas MIME-Version: 1.0 Date: Tue, 28 Jun 2022 14:20:16 -0700 Message-ID: Subject: control message for bug #55764 To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: control 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.5 (/) tags 55764 + patch quit From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 30 22:31:22 2023 Received: (at 55764) by debbugs.gnu.org; 1 Oct 2023 02:31:22 +0000 Received: from localhost ([127.0.0.1]:60250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qmmEs-0005vC-Ai for submit@debbugs.gnu.org; Sat, 30 Sep 2023 22:31:22 -0400 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]:52474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qmmEm-0005uo-Cs for 55764@debbugs.gnu.org; Sat, 30 Sep 2023 22:31:21 -0400 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-50307759b65so23846635e87.0 for <55764@debbugs.gnu.org>; Sat, 30 Sep 2023 19:31:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696127454; x=1696732254; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=HZinW4c3MK6FbF0+RTkKm84s6hZRRXiBMrQ4PTZYgfw=; b=PMRiKcYGrxLMXxkAqMX+v7kfe2jr9/VIsVW7Igizssyd7j0yPIPnz7BtjUeeFYiLaO Wgbn8ZuE7okCftNaufHriNXDo3w+dka/iioJUcTWrgbc/xaY/+65nsRcD/zW4jOSZdNO EW1yubW/nJLSB+G8LCUe4S8/o8rDkdUdt7aOxe63sOFLvy12jcoa8ZFsYHTc2g5wFYuR ZwlEBJUwgR42pcylmyUCiWo5U8DMfNM0zpNsJ/YIYkLyex2P09hVd0NyG0dgexNyTLj7 BFC/yv0FKLtJ1qSxguD75xFgumYrPERN3cjlf0U6KQRHMW1oNYFHcY22YyQ/shsW1t0q P+kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696127454; x=1696732254; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=HZinW4c3MK6FbF0+RTkKm84s6hZRRXiBMrQ4PTZYgfw=; b=grsYXLKfYMlNin5VGzc5wMMsDk/DaAqqc3OXgDmFE5WoCQuqFc4gtQ86c6ElkOjqrt zl2IbpRMYnOPWDGFONLzW6cNPxzAwD1eGUCISafzeedylY0zBSlepN0fCqqye0MmTvQW znyOKknDqPg2mdF8dKNKFDbNYt6NAh8vJ72Id2vr6y71+zIkaYG2kOwotFhMFNA0ESwh Lrhq3NfrQrjBs98PTEr05QRo5KsR2MwKJrZsK0mVFL5OZhBEWoMmnwtyJHGFqISDYoo3 N2tdN0DDyF++C5wERVAtqwrImg9dqDdOeYsiUl3wRdPGXldraGHV8vuT/Z3vRvJ59c7A lgQg== X-Gm-Message-State: AOJu0YwU4VMYWc4UF2pNOJ+Oc5wUS3aRKwRouh/i2VQ8ehMl1gZNFrlp y5Rh8nzavsIGl7MevvYcs0X6+bdchOyRRgB/eU8/M27C X-Google-Smtp-Source: AGHT+IEaGNZjnDsUzETV7w4OWFnTXJTakThoyfyJTQtfrnEmGtcCIKQzfvE0k215B5wmJeCDgtZjrYak+7nkpE/wbvg= X-Received: by 2002:a05:6512:10d5:b0:505:6cc7:e0f7 with SMTP id k21-20020a05651210d500b005056cc7e0f7mr6282075lfg.44.1696127454398; Sat, 30 Sep 2023 19:30:54 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 30 Sep 2023 19:30:53 -0700 From: Stefan Kangas In-Reply-To: <87k09zp3kh.fsf@gmail.com> (Visuwesh's message of "Thu, 02 Jun 2022 19:31:18 +0530") References: <87o7zbp4uc.fsf@gmail.com> <87o7zbw5dz.fsf@gnus.org> <87k09zp3kh.fsf@gmail.com> MIME-Version: 1.0 Date: Sat, 30 Sep 2023 19:30:53 -0700 Message-ID: Subject: Re: bug#55764: 29.0.50; sh-mode: Support mksh's alternate case brace syntax To: Visuwesh Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 55764 Cc: Lars Ingebrigtsen , 55764@debbugs.gnu.org, Stefan Monnier 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: -1.0 (-) Visuwesh writes: > [=E0=AE=B5=E0=AE=BF=E0=AE=AF=E0=AE=BE=E0=AE=B4=E0=AE=A9=E0=AF=8D =E0=AE= =9C=E0=AF=82=E0=AE=A9=E0=AF=8D 02, 2022] Lars Ingebrigtsen wrote: > >> Visuwesh writes: >> >>> mksh and OpenBSD's ksh support an alternative case syntax for historica= l >>> reasons [1], >>> >>> case $i { >>> *pattern) do ;; >>> *pattern2) do2 ;; >>> } >>> >>> Currently, sh-mode cannot handle this and the easy way out of writing a >>> semicolon after $i is out since, >>> >>> % case "foo"; { *o) echo 1;; } >>> /bin/mksh: syntax error: unexpected ';' >>> >>> I came with the attached patch after a bit of trial and error but I'm >>> not sure if it is the right way to do it. >> >> I think that might make sense, but perhaps Stefan has some comments here >> (added to the CCs). > > To no one's surprise, the patch is not the right approach. IIUC, when I > use braces, *pattern) thingies are not recognised as "case-)" anymore so > sh-indent-for-case-label does not get applied. I tried a bit more but I > only got it to respect the first line but still it is definitely not the > right approach, Did you make any further progress here? From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 30 23:37:54 2023 Received: (at 55764) by debbugs.gnu.org; 1 Oct 2023 03:37:54 +0000 Received: from localhost ([127.0.0.1]:60278 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qmnHG-0007pg-4D for submit@debbugs.gnu.org; Sat, 30 Sep 2023 23:37:54 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:28087) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qmnHE-0007pR-5V for 55764@debbugs.gnu.org; Sat, 30 Sep 2023 23:37:53 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 8432B805A9; Sat, 30 Sep 2023 23:37:30 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1696131449; bh=u97+Oko0Ol2gKjSaUP514GqXWDtVztqax2cmrTXG70Y=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=h06gHppeip6/bFgUXM6DmzeFwYcc/6WZYCOLcK2di8Aya2OVrxhk2XKMvzkWFUsIe s5mFwYrTkX9mtSjkRThpkOiqQ90QJEnVUbBznIo5w42Wxpz6DPnkGTUPpIgwTkx09/ uQqtmXC2diXn/aOn7WzuXdiWP4aIchgqo2pQK2x6tb+qDQabUfcqQsWxJKM9h37Ho+ D9SvCOJ3ureD/Stu2HAR9Fs9q06Fpx4xUT5D5lpNwTb7QO9uBRwcvQoRqbxEH5uCuq qRkeiHFJzTnkaIT9DhIVGvFMZDfMqRSwzwsJFt+HOnlAU0KLzZEjF3T62k+7uaYiWm hf4bwGq5tostg== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 3E124803EB; Sat, 30 Sep 2023 23:37:29 -0400 (EDT) Received: from pastel (unknown [216.154.20.132]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 10EFB120321; Sat, 30 Sep 2023 23:37:29 -0400 (EDT) From: Stefan Monnier To: Visuwesh Subject: Re: bug#55764: 29.0.50; sh-mode: Support mksh's alternate case brace syntax In-Reply-To: <87k09zp3kh.fsf@gmail.com> (Visuwesh's message of "Thu, 02 Jun 2022 19:31:18 +0530") Message-ID: References: <87o7zbp4uc.fsf@gmail.com> <87o7zbw5dz.fsf@gnus.org> <87k09zp3kh.fsf@gmail.com> Date: Sat, 30 Sep 2023 23:37:28 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.192 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 X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55764 Cc: Lars Ingebrigtsen , 55764@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 (---) --=-=-= Content-Type: text/plain > To no one's surprise, the patch is not the right approach. IIUC, when I > use braces, *pattern) thingies are not recognised as "case-)" anymore so > sh-indent-for-case-label does not get applied. I tried a bit more but I > only got it to respect the first line but still it is definitely not the > right approach, The first part of the puzzle is to fix the syntax-category of the `)` so it's recognized as a "case-)" rather than a normal ("matched") paren. The patch below seems to do the trick. Stefan --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=openbsd-case.patch diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index cc521cb0591..b34be83367a 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1053,7 +1053,8 @@ 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'. - (and (looking-at ";\\(?:;&?\\|[&|]\\)\\|\\_) id 1rNh07-0007pd-Ff for submit@debbugs.gnu.org; Wed, 10 Jan 2024 17:24:43 -0500 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:56410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNh04-0007pO-7b for 55764@debbugs.gnu.org; Wed, 10 Jan 2024 17:24:41 -0500 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-555aa7fd668so5437266a12.0 for <55764@debbugs.gnu.org>; Wed, 10 Jan 2024 14:24:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704925475; x=1705530275; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=sayAdyRpNvk2t9Q37UspohPp80f3TBu6aREpQlgKbao=; b=Bf+FlFv8l7LOGiIGoqW9GsisbI22Ny99ZAeBzrpVbfnHX0dygmugKslbC1jptTyN9F 85+6amPVWgU8Da0EUzoasd75VvMgc3MpHbkyMXRXxesCesKVLPx/5MWdcP+PrNF2KXBQ X2iYWeTVkMzPiBLGhcM12Lsyum/GjnWcJzZ5ee+Gr39KKYMhwdOACUmLFqlq83GUnu20 GsE9/Y1g4umbx7PwdSJCOpj22DhWJGgBxHd8NnfOOzGlnXwmEAwO4jMa6JyqQjHsHelZ ImvW36gVvEyYANm8wV708PU/Nw4zfLQlgyGqlt35FWd57ka+0nKVnswO4F6YIJb04Ix3 ErpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704925475; x=1705530275; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sayAdyRpNvk2t9Q37UspohPp80f3TBu6aREpQlgKbao=; b=feA3HDSLIYHvbBN4q0i0/C58qqFAti0h7/Nsqt4Md5p1DXLzcTRqXr5x6TajIQW6fW ia8G5vLd1Mu1FxeNv+XECgeGK7y3jKuLLeQ0wgiHIDtNalV0270mJ7etp48Pw5zK03Qv 0Wx/oJyxQV/A35X1xDrO2mk7v0Uap8nzq9n8XcJl8Q9Abnqp50/I1zUPuTMfCK/TLrDu xklqXxhc+ISGkDy5D4E4yuuwLGIDaK2ER1sUL2qFL2Z64sNCd98nF+88Jj75oHqNJNpM fq57RgngtmVJKvOrUuKj/TEoKRhakyUqWXitvjifoljRs+WP0mX0ST6H7+GDfJbzTKR8 C/dw== X-Gm-Message-State: AOJu0YxqvL7Yf7nbBRMkN+lz/jDGuj5151WOWBQsTBvhKV8+pFTVM2zZ 0U0k9WU7UH4Z+10R/AmYp/gCUMevIxB0VsqFJ8g= X-Google-Smtp-Source: AGHT+IGUWaO9CkTtxNTcnCvxCCbC3xYYn0j+TnIhxtNRcOeQyKUKVwfQ4Gn84eTO2TW0/FA3mfxC0EB7Q2+vRNrThCs= X-Received: by 2002:a05:6402:34d0:b0:557:aff:2de8 with SMTP id w16-20020a05640234d000b005570aff2de8mr81931edc.19.1704925475131; Wed, 10 Jan 2024 14:24:35 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 10 Jan 2024 14:24:34 -0800 From: Stefan Kangas In-Reply-To: (Stefan Monnier's message of "Sat, 30 Sep 2023 23:37:28 -0400") References: <87o7zbp4uc.fsf@gmail.com> <87o7zbw5dz.fsf@gnus.org> <87k09zp3kh.fsf@gmail.com> MIME-Version: 1.0 Date: Wed, 10 Jan 2024 14:24:34 -0800 Message-ID: Subject: Re: bug#55764: 29.0.50; sh-mode: Support mksh's alternate case brace syntax To: Stefan Monnier Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 55764 Cc: Lars Ingebrigtsen , 55764@debbugs.gnu.org, Visuwesh 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: -1.0 (-) Stefan Monnier writes: >> To no one's surprise, the patch is not the right approach. IIUC, when I >> use braces, *pattern) thingies are not recognised as "case-)" anymore so >> sh-indent-for-case-label does not get applied. I tried a bit more but I >> only got it to respect the first line but still it is definitely not the >> right approach, > > The first part of the puzzle is to fix the syntax-category of the `)` so > it's recognized as a "case-)" rather than a normal ("matched") paren. > > The patch below seems to do the trick. If you think it looks good, then please install. Nothing stood out when I read it over, FWIW. > > > Stefan > > > diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el > index cc521cb0591..b34be83367a 100644 > --- a/lisp/progmodes/sh-script.el > +++ b/lisp/progmodes/sh-script.el > @@ -1053,7 +1053,8 @@ 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'. > - (and (looking-at ";\\(?:;&?\\|[&|]\\)\\|\\_ + ;; 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 > @@ -2053,9 +2054,9 @@ sh-smie-sh-rules > (sh-var-value 'sh-indent-for-case-label))) > (`(:before . ,(or "(" "{" "[" "while" "if" "for" "case")) > (cond > - ((and (equal token "{") (smie-rule-parent-p "for")) > + ((and (equal token "{") (smie-rule-parent-p "for" "case")) > (let ((data (smie-backward-sexp "in"))) > - (when (equal (nth 2 data) "for") > + (when (member (nth 2 data) '("for" "case")) > `(column . ,(smie-indent-virtual))))) > ((not (smie-rule-prev-p "&&" "||" "|")) > (when (smie-rule-hanging-p) > diff --git a/test/manual/indent/shell.sh b/test/manual/indent/shell.sh > index 5b3fb0e66fb..42a981d312e 100755 > --- a/test/manual/indent/shell.sh > +++ b/test/manual/indent/shell.sh > @@ -189,3 +189,10 @@ bar () > > fi > } > + > +case $i { # Bug#55764 > + *pattern) > + (cd .; echo hi); > + do1 ;; > + *pattern2) do2 ;; > +} From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 11 22:13:19 2024 Received: (at 55764-done) by debbugs.gnu.org; 12 Jan 2024 03:13:20 +0000 Received: from localhost ([127.0.0.1]:34500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO7yx-0007Ue-Kf for submit@debbugs.gnu.org; Thu, 11 Jan 2024 22:13:19 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:26055) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO7yu-0007UO-OG for 55764-done@debbugs.gnu.org; Thu, 11 Jan 2024 22:13:17 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 9D5F680F5B; Thu, 11 Jan 2024 22:13:13 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1705029192; bh=uu7WoofqymNHNY67BWssLTlDXUrkDzL/Mz+Lzd1+VCQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=VEekPzJs3MRfhFaHEuBWZD7YqCpQ/bZzoi7CZ/G/L26D2ym0DVGW98SDThFUZi3WP T818tfbsd2vid9SrHATClmzmQplCb3LvIvilcQLlUuqVpNStTtVxpKBGVsW7SPxMHB z7rI1Tc2NhSLApMBJ46Kw8wjiC9giEvboAGQVygJCcQekzdZiPoSa47gEgo8ubxOEj 5CNy2zJ77SeckIotuJjj+JDqyQKABkXQ6vSt+ByTrtv/txKvXbU/+w0Zy5kAJtLNlt kqXGqylxdrD9tYjmiw+lq1uj7QnI05OGZLQws99wYfqUdk8Mi1CO6/6tpVzp+28yQq c22YoLOYXMkHw== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 91CB380A64; Thu, 11 Jan 2024 22:13:12 -0500 (EST) Received: from pastel (65-110-221-238.cpe.pppoe.ca [65.110.221.238]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 642B712062F; Thu, 11 Jan 2024 22:13:12 -0500 (EST) From: Stefan Monnier To: Stefan Kangas Subject: Re: bug#55764: 29.0.50; sh-mode: Support mksh's alternate case brace syntax In-Reply-To: (Stefan Kangas's message of "Wed, 10 Jan 2024 14:24:34 -0800") Message-ID: References: <87o7zbp4uc.fsf@gmail.com> <87o7zbw5dz.fsf@gnus.org> <87k09zp3kh.fsf@gmail.com> Date: Thu, 11 Jan 2024 22:13:10 -0500 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.041 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 T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55764-done Cc: Lars Ingebrigtsen , 55764-done@debbugs.gnu.org, Visuwesh 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 (---) >> The patch below seems to do the trick. > If you think it looks good, then please install. Nothing stood out > when I read it over, FWIW. Thanks for the reminder. Pushed. Closing, Stefan From unknown Thu Sep 11 17:28:40 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 09 Feb 2024 12:24:14 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator