summaryrefslogtreecommitdiff
path: root/lisp/progmodes/sh-script.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/sh-script.el')
-rw-r--r--lisp/progmodes/sh-script.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 02d329d794..7f89ab2762 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -2115,7 +2115,11 @@ May return nil if the line should not be treated as continued."
;; sh-indent-after-done: aligned completely differently.
(`(:after . "in") (sh-var-value 'sh-indent-for-case-label))
;; sh-indent-for-continuation: Line continuations are handled differently.
- (`(:after . ,(or `"(" `"{" `"[")) (sh-var-value 'sh-indent-after-open))
+ (`(:after . ,(or `"(" `"{" `"["))
+ (if (not (looking-at ".[ \t]*[^\n \t#]"))
+ (sh-var-value 'sh-indent-after-open)
+ (goto-char (1- (match-end 0)))
+ `(column . ,(current-column))))
;; sh-indent-after-function: we don't handle it differently.
))