unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Doug Maxey <emacs-bugs@maxeygroup.tech>, 53817@debbugs.gnu.org
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	[thread overview]
Message-ID: <87bkzjxfb2.fsf@gnus.org> (raw)
In-Reply-To: <jwvmtj3y204.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sun, 06 Feb 2022 19:11:23 -0500")

Stefan Monnier <monnier@iro.umontreal.ca> 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





      parent reply	other threads:[~2022-02-07  8:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-06  4:37 bug#53817: 28.0.91; sh-mode indent misses on 'if test; then' when 'then' is on 'if' line Doug Maxey
2022-02-06 23:50 ` Lars Ingebrigtsen
2022-02-07  0:11   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-07  0:14     ` Doug Maxey
2022-02-07  8:16     ` Lars Ingebrigtsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bkzjxfb2.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=53817@debbugs.gnu.org \
    --cc=emacs-bugs@maxeygroup.tech \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).