unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#50320: 28.0.50; Recent changes cause functions in sh-script-mode to be indented incorrectly
@ 2021-09-01  4:15 Diego via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-09-02  6:16 ` Kévin Le Gouguec
  0 siblings, 1 reply; 4+ messages in thread
From: Diego via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-09-01  4:15 UTC (permalink / raw)
  To: 50320

I'm not quite sure when this behavior was introduced, but I suspect commits 4bb70549 or 6392bc37a may be responsible:

With emacs built from git on commit 03dcceeee if I have a function, say:

myecho () {
    echo "foo"
}

And I call M-x indent-region on it, it gets indented to:

myecho () {
echo "foo"
}

Which I don't think is the correct indentation for functions in shell scripts.

Diego





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#50320: 28.0.50; Recent changes cause functions in sh-script-mode to be indented incorrectly
  2021-09-01  4:15 bug#50320: 28.0.50; Recent changes cause functions in sh-script-mode to be indented incorrectly Diego via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-09-02  6:16 ` Kévin Le Gouguec
  2021-09-02  6:44   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Kévin Le Gouguec @ 2021-09-02  6:16 UTC (permalink / raw)
  To: 50320; +Cc: Lars Ingebrigtsen, Diego

Diego via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs@gnu.org> writes:

> I'm not quite sure when this behavior was introduced, but I suspect
> commits 4bb70549 or 6392bc37a may be responsible:

Seems to be 6392bc37a; reverting it makes your test case pass again.

As things stand, I don't know enough about SMIE to understand what the
correct fix is.  A plain revert might be the best immediate action,
unless someone knowledgeable enough can reconcile my commit with Diego's
example.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#50320: 28.0.50; Recent changes cause functions in sh-script-mode to be indented incorrectly
  2021-09-02  6:16 ` Kévin Le Gouguec
@ 2021-09-02  6:44   ` Lars Ingebrigtsen
  2021-09-02  7:54     ` Kévin Le Gouguec
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-02  6:44 UTC (permalink / raw)
  To: Kévin Le Gouguec; +Cc: Diego, 50320

Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:

>> I'm not quite sure when this behavior was introduced, but I suspect
>> commits 4bb70549 or 6392bc37a may be responsible:
>
> Seems to be 6392bc37a; reverting it makes your test case pass again.

I've now reverted the change and added a test.

> As things stand, I don't know enough about SMIE to understand what the
> correct fix is.  A plain revert might be the best immediate action,
> unless someone knowledgeable enough can reconcile my commit with Diego's
> example.

My understanding of SMIE is ... pretty vague.  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#50320: 28.0.50; Recent changes cause functions in sh-script-mode to be indented incorrectly
  2021-09-02  6:44   ` Lars Ingebrigtsen
@ 2021-09-02  7:54     ` Kévin Le Gouguec
  0 siblings, 0 replies; 4+ messages in thread
From: Kévin Le Gouguec @ 2021-09-02  7:54 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Diego, 50320

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I've now reverted the change and added a test.

Thanks!

> My understanding of SMIE is ... pretty vague.  :-)

I'll push (info "(elisp) SMIE") to the top of the stack on my
nightstand, then :)





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-02  7:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-01  4:15 bug#50320: 28.0.50; Recent changes cause functions in sh-script-mode to be indented incorrectly Diego via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-02  6:16 ` Kévin Le Gouguec
2021-09-02  6:44   ` Lars Ingebrigtsen
2021-09-02  7:54     ` Kévin Le Gouguec

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).