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

From: [email-masked]
Date: Thu, 24 Aug 2017 21:12:22 -0400

<[email-masked]> writes:

> So the above seem to demonstrate that sh-name-buffer and
> sh-save-styles-to-buffer don't save all indentation information.

Oh, I think the commentary I found is actually for the old sh-script
specific indentation.  If 'sh-use-smie' is set (the default) you should
rather use M-x smie-save-config.  And then it seems an extra step is
needed to activate it in the current session, evalute this expression:

    (customize-set-variable 'smie-config
                            ;; This value is set by `smie-save-config'.
                            '((sh-mode (-2 :before "then" 0))))

I'm not sure if this is because I'm testing with 'emacs -Q', or
something is missing from 'smie-save-config'.  I think normally the
value would saved with the other customized options and work without any
extra effort.

> Please let me know if you'd like any further information.

Could you also please post a script which gives the bad indentation?
This could be another bug in itself.