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

From: <[email-masked]>
Date: Fri, 25 Aug 2017 14:31:10 +0000

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.