diff options
Diffstat (limited to 'lisp/progmodes/sh-script.el')
| -rw-r--r-- | lisp/progmodes/sh-script.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 1601b6c81ae..724d22ab69b 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1989,9 +1989,10 @@ May return nil if the line should not be treated as continued." (<= indent initial))))) `(column . ,(+ initial sh-indentation))) (`(:before . ,(or `"(" `"{" `"[")) - (when (smie-rule-hanging-p) - (if (not (smie-rule-prev-p "&&" "||" "|")) - (smie-rule-parent) + (if (not (smie-rule-prev-p "&&" "||" "|")) + (when (smie-rule-hanging-p) + (smie-rule-parent)) + (unless (smie-rule-bolp) (smie-backward-sexp 'halfexp) `(column . ,(smie-indent-virtual))))) ;; FIXME: Maybe this handling of ;; should be made into |
