Subject: 24.5; Undesirable sh-mode indent

From: Bob Proulx <[email-masked]>
Date: Sat, 24 Oct 2015 13:04:55 -0600

In 24.5.1 from Debian Sid I am now getting an undesirable indent that
is no longer controlled by sh-basic-offset.  In 23 this worked.

emacs -Q /tmp/trial.sh

M-: (setq sh-basic-offset 2)

if true; then
    true
    ^ indent should be 2 not 4 here

C-c ?
Rules used: :elem basic -> 4, :before "then" -> 0, :after "then" -> nil

Anyone know what is happening here?  I have reviewed the NEWS and the
latest manual but I didn't find any intentionally noted changes.

Thanks,
Bob

In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2015-09-19 on trouble, modified by Debian
System Description:	Debian GNU/Linux unstable (sid)

Configured using:
 `configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
 --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
 --with-x=yes --with-x-toolkit=lucid --with-toolkit-scroll-bars
 --without-gconf --without-gsettings 'CFLAGS=-g -O2
 -fstack-protector-strong -Wformat -Werror=format-security -Wall'
 CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-z,relro'

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Loading /etc/emacs/site-start.d/51debian-el.el (source)...done
Loading /etc/emacs/site-start.d/51planner-el.el (source)...
Loading /usr/share/emacs24/site-lisp/planner-el/planner-autoloads.el (source)...done
Loading /etc/emacs/site-start.d/51planner-el.el (source)...done
Loading /etc/emacs/site-start.d/52remember-el.el (source)...
Loading /usr/share/emacs/site-lisp/remember-el/remember-autoloads.el (source)...done
Loading /etc/emacs/site-start.d/52remember-el.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.
e is undefined
p is undefined

Load-path shadows:
/usr/share/emacs24/site-lisp/css-mode/css-mode hides /usr/share/emacs/site-lisp/css-mode/css-mode
/usr/share/emacs24/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs/24.5/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs24/site-lisp/flim/hex-util hides /usr/share/emacs/24.5/lisp/hex-util
/usr/share/emacs24/site-lisp/flim/md4 hides /usr/share/emacs/24.5/lisp/md4
/usr/share/emacs24/site-lisp/css-mode/css-mode hides /usr/share/emacs/24.5/lisp/textmodes/css-mode
/usr/share/emacs/site-lisp/remember-el/remember hides /usr/share/emacs/24.5/lisp/textmodes/remember
/usr/share/emacs24/site-lisp/flim/sasl-cram hides /usr/share/emacs/24.5/lisp/net/sasl-cram
/usr/share/emacs24/site-lisp/flim/ntlm hides /usr/share/emacs/24.5/lisp/net/ntlm
/usr/share/emacs24/site-lisp/flim/sasl-ntlm hides /usr/share/emacs/24.5/lisp/net/sasl-ntlm
/usr/share/emacs24/site-lisp/flim/sasl hides /usr/share/emacs/24.5/lisp/net/sasl
/usr/share/emacs24/site-lisp/flim/hmac-md5 hides /usr/share/emacs/24.5/lisp/net/hmac-md5
/usr/share/emacs24/site-lisp/flim/sasl-digest hides /usr/share/emacs/24.5/lisp/net/sasl-digest
/usr/share/emacs24/site-lisp/flim/hmac-def hides /usr/share/emacs/24.5/lisp/net/hmac-def
/usr/share/emacs24/site-lisp/erc/erc-ring hides /usr/share/emacs/24.5/lisp/erc/erc-ring
/usr/share/emacs24/site-lisp/erc/erc-truncate hides /usr/share/emacs/24.5/lisp/erc/erc-truncate
/usr/share/emacs24/site-lisp/erc/erc-match hides /usr/share/emacs/24.5/lisp/erc/erc-match
/usr/share/emacs24/site-lisp/erc/erc-autoaway hides /usr/share/emacs/24.5/lisp/erc/erc-autoaway
/usr/share/emacs24/site-lisp/erc/erc-button hides /usr/share/emacs/24.5/lisp/erc/erc-button
/usr/share/emacs24/site-lisp/erc/erc-goodies hides /usr/share/emacs/24.5/lisp/erc/erc-goodies
/usr/share/emacs24/site-lisp/erc/erc-notify hides /usr/share/emacs/24.5/lisp/erc/erc-notify
/usr/share/emacs24/site-lisp/erc/erc-backend hides /usr/share/emacs/24.5/lisp/erc/erc-backend
/usr/share/emacs24/site-lisp/erc/erc-xdcc hides /usr/share/emacs/24.5/lisp/erc/erc-xdcc
/usr/share/emacs24/site-lisp/erc/erc-join hides /usr/share/emacs/24.5/lisp/erc/erc-join
/usr/share/emacs24/site-lisp/erc/erc-pcomplete hides /usr/share/emacs/24.5/lisp/erc/erc-pcomplete
/usr/share/emacs24/site-lisp/erc/erc-identd hides /usr/share/emacs/24.5/lisp/erc/erc-identd
/usr/share/emacs24/site-lisp/erc/erc-stamp hides /usr/share/emacs/24.5/lisp/erc/erc-stamp
/usr/share/emacs24/site-lisp/erc/erc-page hides /usr/share/emacs/24.5/lisp/erc/erc-page
/usr/share/emacs24/site-lisp/erc/erc hides /usr/share/emacs/24.5/lisp/erc/erc
/usr/share/emacs24/site-lisp/erc/erc-sound hides /usr/share/emacs/24.5/lisp/erc/erc-sound
/usr/share/emacs24/site-lisp/erc/erc-replace hides /usr/share/emacs/24.5/lisp/erc/erc-replace
/usr/share/emacs24/site-lisp/erc/erc-log hides /usr/share/emacs/24.5/lisp/erc/erc-log
/usr/share/emacs24/site-lisp/erc/erc-track hides /usr/share/emacs/24.5/lisp/erc/erc-track
/usr/share/emacs24/site-lisp/erc/erc-imenu hides /usr/share/emacs/24.5/lisp/erc/erc-imenu
/usr/share/emacs24/site-lisp/erc/erc-capab hides /usr/share/emacs/24.5/lisp/erc/erc-capab
/usr/share/emacs24/site-lisp/erc/erc-lang hides /usr/share/emacs/24.5/lisp/erc/erc-lang
/usr/share/emacs24/site-lisp/erc/erc-services hides /usr/share/emacs/24.5/lisp/erc/erc-services
/usr/share/emacs24/site-lisp/erc/erc-ezbounce hides /usr/share/emacs/24.5/lisp/erc/erc-ezbounce
/usr/share/emacs24/site-lisp/erc/erc-speedbar hides /usr/share/emacs/24.5/lisp/erc/erc-speedbar
/usr/share/emacs24/site-lisp/erc/erc-spelling hides /usr/share/emacs/24.5/lisp/erc/erc-spelling
/usr/share/emacs24/site-lisp/erc/erc-list hides /usr/share/emacs/24.5/lisp/erc/erc-list
/usr/share/emacs24/site-lisp/erc/erc-dcc hides /usr/share/emacs/24.5/lisp/erc/erc-dcc
/usr/share/emacs24/site-lisp/erc/erc-menu hides /usr/share/emacs/24.5/lisp/erc/erc-menu
/usr/share/emacs24/site-lisp/erc/erc-netsplit hides /usr/share/emacs/24.5/lisp/erc/erc-netsplit
/usr/share/emacs24/site-lisp/erc/erc-networks hides /usr/share/emacs/24.5/lisp/erc/erc-networks
/usr/share/emacs24/site-lisp/erc/erc-compat hides /usr/share/emacs/24.5/lisp/erc/erc-compat
/usr/share/emacs24/site-lisp/erc/erc-fill hides /usr/share/emacs/24.5/lisp/erc/erc-fill
/usr/share/emacs24/site-lisp/erc/erc-ibuffer hides /usr/share/emacs/24.5/lisp/erc/erc-ibuffer
/usr/share/emacs24/site-lisp/erc/erc-hecomplete hides /usr/share/emacs/24.5/lisp/obsolete/erc-hecomplete

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
help-fns mail-prsvr mail-utils xterm time-date info easymenu package
epg-config remember-autoloads planner-autoloads debian-el
debian-el-loaddefs w3m-load muse-autoloads erc-auto jabber-autoloads
emacs-goodies-el emacs-goodies-custom emacs-goodies-loaddefs easy-mmode
dpkg-dev-el dpkg-dev-el-loaddefs dash-functional dash bbdb-autoloads
tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp
files text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting font-render-setting x-toolkit x
multi-tty emacs)

Memory information:
((conses 16 94821 5787)
 (symbols 48 19910 0)
 (miscs 40 70 107)
 (strings 32 16043 5285)
 (string-bytes 1 503690)
 (vectors 16 8494)
 (vector-slots 8 355157 20689)
 (floats 8 68 293)
 (intervals 56 221 0)
 (buffers 960 12)
 (heap 1024 23801 864))