summaryrefslogtreecommitdiff
path: root/lisp/progmodes/sh-script.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2009-10-24 21:15:39 +0000
committerChong Yidong <cyd@stupidchicken.com>2009-10-24 21:15:39 +0000
commit3e8ae8a6346e5c58d56dc99f632baaf02e255b7a (patch)
treeb724f883617a5120aa879456ded62c05603226b0 /lisp/progmodes/sh-script.el
parentab276820088305a2e3b94f8f62d42f9c043c5c66 (diff)
downloademacs-3e8ae8a6346e5c58d56dc99f632baaf02e255b7a.tar.gz
emacs-3e8ae8a6346e5c58d56dc99f632baaf02e255b7a.tar.bz2
emacs-3e8ae8a6346e5c58d56dc99f632baaf02e255b7a.zip
* progmodes/sh-script.el (sh-font-lock-paren): Handle case
patterns that are preceded by an open-paren (Bug#1320).
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.