From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#53817: 28.0.91; sh-mode indent misses on 'if test; then' when 'then' is on 'if' line Date: Mon, 07 Feb 2022 09:16:01 +0100 Message-ID: <87bkzjxfb2.fsf@gnus.org> References: <87czk0zk43.fsf@maxeygroup.tech> <87y22n367a.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36386"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Doug Maxey , 53817@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 07 10:49:04 2022 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 1nH0dr-0009EP-MY for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 07 Feb 2022 10:49:03 +0100 Original-Received: from localhost ([::1]:53458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nH0dq-0001Gd-CC for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 07 Feb 2022 04:49:02 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57642) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGzCq-00064Y-JU for bug-gnu-emacs@gnu.org; Mon, 07 Feb 2022 03:17:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46914) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGzCo-0005mq-8q for bug-gnu-emacs@gnu.org; Mon, 07 Feb 2022 03:17:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nGzCn-0005QB-V3 for bug-gnu-emacs@gnu.org; Mon, 07 Feb 2022 03:17:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Feb 2022 08:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53817 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 53817-submit@debbugs.gnu.org id=B53817.164422178120773 (code B ref 53817); Mon, 07 Feb 2022 08:17:01 +0000 Original-Received: (at 53817) by debbugs.gnu.org; 7 Feb 2022 08:16:21 +0000 Original-Received: from localhost ([127.0.0.1]:40807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nGzC8-0005Oz-V3 for submit@debbugs.gnu.org; Mon, 07 Feb 2022 03:16:21 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:36992) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nGzC4-0005Oe-Dv for 53817@debbugs.gnu.org; Mon, 07 Feb 2022 03:16:19 -0500 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=1Fj8v1h9bPtdkT6y2dm+gLGgTmu4kpRjPNIQ91oIjdA=; b=dTHIBdqKrpyGe8eluFqEC8rQDu bgFCTFJbR3lVwBR8tgTPZJL562B5uKXMo+HTkgDyz337j7BOBn018rpt3fxnRTego2ktBfMxWz47/ vys2UtvodoGO43h6lHNTGP6zbe5wfucs0oulmTG4i3KWetVhywoK2TUWrYaaNuE0uWxo=; Original-Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nGzBs-0006Is-0x; Mon, 07 Feb 2022 09:16:07 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACVBMVEVaYGV+i5X///8Q RDtnAAAAAWJLR0QCZgt8ZAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB+YCBwgNOQ9mnhsA AADrSURBVCjPbdJNDoQgDAXg10T2ksB9IBn2krT3v8q8IqCZjBvz2T+sAgl2YV2EvpANkGODeUfa ENiOqCAfGzG0c8HkrHhg97CEYFZEpWwAYYM54VrggbLeaMaR8QMUHsO8qLcBtuaB2J8QY9FJVMKK R/igo+TL8xyG6l0JL0QjwoLOiDmKIvGuC2LzcoypP2h/IqOoT/igHeFLyJOGzwNwM680fUUgDp3w nXhkfIu84Os/60R0xPyKSB4NLFLJN9Q5TPrFHbNDRLUYPaP58pmm0fQK3cKcAw2m54KEXgtr7r8m N/4ID/hN0wbwBaiKX524r8YGAAAAQXRFWHRjb21tZW50AENSRUFUT1I6IGdkLWpwZWcgdjEuMCAo dXNpbmcgSUpHIEpQRUcgdjYyKSwgcXVhbGl0eSA9IDkwCnd1XskAAAAldEVYdGRhdGU6Y3JlYXRl ADIwMjItMDItMDdUMDg6MTM6NTcrMDA6MDBWfNayAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTAy LTA3VDA4OjEzOjU3KzAwOjAwJyFuDgAAAABJRU5ErkJggg== X-Now-Playing: Yes's _Going For the One_: "Awaken" In-Reply-To: (Stefan Monnier's message of "Sun, 06 Feb 2022 19:11:23 -0500") 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" Xref: news.gmane.io gmane.emacs.bugs:226230 Archived-At: Stefan Monnier writes: > The sh syntax is fairly nasty to parse, especially backwards, so I can't > give you any general comment here. I'd try something and then see if it > breaks any tests (including looking at test/manual/indent/shell.sh). > > For sure, I'd recommend adding a regression test. I've now tweaked the loop, and it fixes the issue and doesn't seem to break anything in the manual test tile. (And I added some automatic tests.) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no