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.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 47eec4ee13f..ef37b3bfa0d 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1109,6 +1109,9 @@ subshells can nest."
(when (memq (char-before) '(?\" ?\'))
(condition-case nil (progn (backward-sexp 1) t)
(error nil)))))
+ ;; Patterns can be preceded by an open-paren (Bug#1320).
+ (if (= (char-before (point)) ?\()
+ (backward-char 1))
(while (progn
(forward-comment (- (point-max)))
;; Maybe we've bumped into an escaped newline.