From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.bugs Subject: bug#31609: 25.3; sh-mode is confused about bash extglobs in case patterns Date: Mon, 28 May 2018 09:32:11 +1200 Message-ID: <258635115c95ebb3eb97444c62c63307@webmail.orcon.net.nz> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1527456668 31610 195.159.176.226 (27 May 2018 21:31:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 27 May 2018 21:31:08 +0000 (UTC) User-Agent: Orcon Webmail Cc: 31609@debbugs.gnu.org, bug-gnu-emacs To: Ville =?UTF-8?Q?Skytt=C3=A4?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 27 23:31:04 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fN3Fn-000845-5I for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 May 2018 23:31:03 +0200 Original-Received: from localhost ([::1]:53336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fN3Hs-0000WN-JU for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 May 2018 17:33:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fN3Hl-0000W7-UM for bug-gnu-emacs@gnu.org; Sun, 27 May 2018 17:33:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fN3Hi-00056D-RX for bug-gnu-emacs@gnu.org; Sun, 27 May 2018 17:33:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43418) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fN3Hi-00055W-OC for bug-gnu-emacs@gnu.org; Sun, 27 May 2018 17:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fN3Hi-0006De-EU for bug-gnu-emacs@gnu.org; Sun, 27 May 2018 17:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 May 2018 21:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31609 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31609-submit@debbugs.gnu.org id=B31609.152745673823854 (code B ref 31609); Sun, 27 May 2018 21:33:02 +0000 Original-Received: (at 31609) by debbugs.gnu.org; 27 May 2018 21:32:18 +0000 Original-Received: from localhost ([127.0.0.1]:51315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fN3H0-0006Cg-1h for submit@debbugs.gnu.org; Sun, 27 May 2018 17:32:18 -0400 Original-Received: from smtp-3.orcon.net.nz ([60.234.4.44]:39074) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fN3Gx-0006CX-Pd for 31609@debbugs.gnu.org; Sun, 27 May 2018 17:32:16 -0400 Original-Received: from [10.253.37.70] (port=30421 helo=webmail.orcon.net.nz) by smtp-3.orcon.net.nz with esmtpa (Exim 4.86_2) (envelope-from ) id 1fN3Gt-0005cQ-Qa; Mon, 28 May 2018 09:32:11 +1200 Original-Received: from [150.107.175.176] via [10.253.37.253] by webmail.orcon.net.nz with HTTP (HTTP/1.1 POST); Mon, 28 May 2018 09:32:11 +1200 In-Reply-To: X-Sender: psainty@orcon.net.nz X-GeoIP: -- X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:146615 Archived-At: If a workaround helps you, these variants are correctly indented: case $foo in (@(bar|quux)) : do things;; (@(bar|quux)) { : do things };; esac On 2018-05-28 04:44, Ville Skyttä wrote: > When using bash's extended globbing constructs such as @(...), +(...), > !(...), *(...) in case patterns, sh-mode gets confused and indentation > no longer works properly. > > For example: > > case $foo in > @(bar|quux)) > <-- TAB brings the cursor here > <-- ...whereas I would have expected it to be here > [...] > > The indentation continues to be off for the remainder of the file, > i.e. after the ;; and terminating `esac'. > > This is a largish annoyance for me when working with bash-completion, > which currently uses these constructs quite a bit in case patterns, and > more is on the way.