Subject: Re: bug#17818: 24.3.91; sh-learn-buffer-indent doesn't learn current indent anymore

From: Stefan Monnier <[email-masked]>
Date: Fri, 20 Jun 2014 11:48:17 -0400

> in Emacs 24.3.91, `sh-learn-buffer-indent' doesn't seem to learn the
> current indent rules of the buffer anymore.  It worked correctly in
> 23.3 and better in 24.1, see below.

24.4 uses SMIE, so the indentation rules are quite different and they
don't obey all the sh-indent-* variables.  Also the "learning" code uses
SMIE's generic learning code which is brand new and hasn't seen much
testing yet.

So, there might be bugs at several levels:
1- setting sh-use-smie to nil should revert to the 24.3 behavior.
   This is just a stop-gap setting that will disappear in some future
   release (depending on how many bug reports we get about the SMIE
   code ;-).
2- If you set the sh-indent-* vars learned by the non-SMIE code, the
   SMIE code should indent as desired.
3- the generic SMIE learning code should behave about as well as the old
   sh-learn-buffer-indent (i.e. "poorly" in my opinion ;-).

        Stefan