Open the code below with emacs -q
, do set-variable sh-basic-offset 2
, then indent-region
. All lines are indented with 2, while the echo
line is indented with 4. Is this a bug in Emacs, or how do I configure it to indent consistently with 2? (When setting to 8, echo
is still indented with 4.)
Using latest release GNU Emacs 25.3.1 on macOS installed with Homebrew.
#!/bin/bash
hello() {
while true; do
if [ true ]; then
····echo true
fi
done
}
emacs -q
to make sure none of your.emacs
settings interfere with testing? If the bug happens with-q
and doesn't without, I'd be interested in hearing which.emacs
setting of your makes things work. – forthrin Mar 16 '18 at 19:49