Commit 9e248ebd authored by Stefan Monnier's avatar Stefan Monnier

* lisp/progmodes/sh-script.el (sh-smie-sh-rules): For { after &&, don't

align with the surrounding parent.

Fixes: debbugs:17721
parent 58b9840b
2014-06-20 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/sh-script.el (sh-smie-sh-rules): For { after &&, don't
align with the surrounding parent (bug#17721).
2014-06-20 Eli Zaretskii <eliz@gnu.org>
* textmodes/texinfo.el (texinfo-mode): Set skeleton-end-newline
......
......@@ -1952,7 +1952,11 @@ May return nil if the line should not be treated as continued."
(<= indent initial))
`(column . ,(+ initial sh-indentation)))))
(`(:before . ,(or `"(" `"{" `"["))
(if (smie-rule-hanging-p) (smie-rule-parent)))
(when (smie-rule-hanging-p)
(if (not (smie-rule-prev-p "&&" "||" "|"))
(smie-rule-parent)
(smie-backward-sexp 'halfexp)
`(column . ,(smie-indent-virtual)))))
;; FIXME: Maybe this handling of ;; should be made into
;; a smie-rule-terminator function that takes the substitute ";" as arg.
(`(:before . ,(or `";;" `";&" `";;&"))
......
......@@ -33,6 +33,14 @@ esac
bar
}
for foo in bar; do # bug#17721
[ -e $foo ] && {
echo t
} && {
echo r
}
done
echo -n $(( 5 << 2 ))
# This should not be treated as a heredoc (bug#12770).
2
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment