From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mauro Aranda Newsgroups: gmane.emacs.bugs Subject: bug#26217: bug#2910: 23.0.60; Shell-script coloring bug Date: Fri, 13 Oct 2023 09:07:50 -0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31824"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Martin Vath , Stefan Monnier To: 26217@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 13 14:09:02 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qrGyT-00081T-NY for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 13 Oct 2023 14:09:01 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrGy8-000342-K8; Fri, 13 Oct 2023 08:08:40 -0400 Original-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 1qrGy7-00033M-O3 for bug-gnu-emacs@gnu.org; Fri, 13 Oct 2023 08:08:39 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qrGy7-0000V7-FI for bug-gnu-emacs@gnu.org; Fri, 13 Oct 2023 08:08:39 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qrGyU-0002i7-Cq for bug-gnu-emacs@gnu.org; Fri, 13 Oct 2023 08:09:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Oct 2023 12:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26217 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 26217-submit@debbugs.gnu.org id=B26217.169719890610372 (code B ref 26217); Fri, 13 Oct 2023 12:09:02 +0000 Original-Received: (at 26217) by debbugs.gnu.org; 13 Oct 2023 12:08:26 +0000 Original-Received: from localhost ([127.0.0.1]:45395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrGxt-0002hE-IT for submit@debbugs.gnu.org; Fri, 13 Oct 2023 08:08:25 -0400 Original-Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:61451) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrGxr-0002gz-64 for 26217@debbugs.gnu.org; Fri, 13 Oct 2023 08:08:23 -0400 Original-Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1bdf4752c3cso14549865ad.2 for <26217@debbugs.gnu.org>; Fri, 13 Oct 2023 05:08:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697198874; x=1697803674; darn=debbugs.gnu.org; h=content-transfer-encoding:subject:from:cc:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=b5gfe2e+XHv+xXKIdDPlZpyXz+hXFnJtM6v/6Te0FjE=; b=jT/t/f6r2XIRTEUFVkz1dIdNreeD54R0Mb6IM8NVXDHPkeGFMhrZsvc8oPoFYXMcIZ hKu4KnyOT6I7aZPKqfMP5JUzd8c3CrbrqyesLvU6sdlZZ60bKW4LSBqwrJpWG9UyFnrc mqCoX9mBhuVowGIYrT54weMzGSKrDykVHGX3jl9NcAMyNah0cQ9T5uvFSKefUTTYFd/i Q3zR6NzggB1yClIkbH2tNMELqsg/H602Lf2ddsSetaVhV9kM3KW0SAUH5YO4FM7cVQcS fcY9FZ6af3GnRrbelBVrrL0OSHza1lj8dzUZXcxOIJbbTt6NAYkgSYankODSYmOn8jz4 81aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697198874; x=1697803674; h=content-transfer-encoding:subject:from:cc:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=b5gfe2e+XHv+xXKIdDPlZpyXz+hXFnJtM6v/6Te0FjE=; b=DdAR5aPD2j8CmihiHNRHt53EUUUp/91NAfduNzLhO+c+dNW8IC0abTcUM0T8sCvBWh JFbxvr3/RkvcD1FiQBJuxOAquqFID8au7ufvYpHtswD2ciwYRNjMDJ3S2dVwbTkhkJp+ Na0fRroTNs87fQIAXOqNbd9DON4e46KNoJnnmx+rUiIWzDBoEkm52TPU6K0dVqkW45AX NmqEHR93HDYeedgMPM1lSUDTEOrtkDUSeonUpzhMbc2AUI+eoGZCyGs+CR3x1zebn1QI IHTLDMv7+MsOpPoDEOdsr8pDyO4bJbZVLLg/sMDyim28K9OOm3fHyd/iNLHWIlWAofnP 8X1A== X-Gm-Message-State: AOJu0Ywl1cIpn6wwS6fkV2Xx/yNsZ0mBcRRH42D2LR4pmZ1dpOjxHb9q QGj5Ft9E+9/thUIaB3VhBrOlgSE8G3SyjosE X-Google-Smtp-Source: AGHT+IGQIeYwVHQ8hBzr7jU9VpYqJWLqURMR8d63zt5VufwiNYyBNUFSYGhwh+VmNZTyILkCxvCq6A== X-Received: by 2002:a17:902:d488:b0:1c8:9832:827f with SMTP id c8-20020a170902d48800b001c89832827fmr17582587plg.20.1697198873785; Fri, 13 Oct 2023 05:07:53 -0700 (PDT) Original-Received: from [192.168.0.234] ([152.168.142.156]) by smtp.gmail.com with ESMTPSA id iy3-20020a170903130300b001bf11cf2e21sm3757252plb.210.2023.10.13.05.07.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 13 Oct 2023 05:07:53 -0700 (PDT) Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272343 Archived-At: Martin Vath writes: > 1. M-x shell-script-mode > 2. Type: " > for i do echo 1; done > for i; do echo 1; done > " > > Despite both lines are correct full loops according to POSIX > and in fact understood by all current shells (see below), > this does not correspond to the indentation of emacs and > coloring of "do" in the first line. This Bug Report (and the other ones merged with it) have two parts: - No highlight for "do" in: for i do echo 1; done This works if using bash-ts-mode, which claims in its docstring it can support Bash or sh. I don't know what's the decision (if there is one) about situations like these.  If the bugs in lang-mode are fixed by lang-ts-mode, will these bug reports be treated as: wontfix? fixed? open in case someone wants to spend time in lang-mode? - Wrong indentation for lines after: for i do echo 1; done I took a look at this, and ISTM that giving "do" a special treatment like sh-smie--sh-keyword-p gives to "in" might fix this, perhaps by reusing sh-smie--sh-keyword-in-p. I know very little about SMIE, so I'm CCing Stefan M.