Subject: Re: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent?

From: Noam Postavsky <[email-masked]>
Date: Sat, 26 Aug 2017 16:08:04 -0400

On Fri, Aug 25, 2017 at 10:31 AM,  <[email-masked]> wrote:
> A little extra information that will possibly muddy the waters...
>
> I've the same version of Emacs on a Windows machine (I use Linux Mint normally) and I've essentially the same ~/.emacs file on both machines, but for some reason the Windows one behaves differently for bash scripts!  Perhaps the sh-mode comes from somewhere else or is a different version, I don't know.  On Windows, though, when I go to a correctly indented line in a function and press tab, it indents incorrectly! :-(
>
> So for example,
>
> #!/usr/bin/env bash
>
> function f {
>   echo Hello from the function
> }
>
> f
>
> On Windows, when I'm on the "echo" line and press tab, it indents to 4 spaces; on Linux it doesn't.

Can you narrow down the relevant .emacs settings? If I do emacs -Q
--eval "(setq sh-basic-offset 2)" hello-function.sh on Windows Emacs
24.5, I get 2 space indentation.