diff lisp/progmodes/sh-script.el @ 105753:cdd9e1b1a30f

* progmodes/sh-script.el (sh-font-lock-paren): Handle case patterns that are preceded by an open-paren (Bug#1320).
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 24 Oct 2009 21:15:39 +0000
parents 0769a73f1d18
children df4934f25eef
line wrap: on
line diff
--- a/lisp/progmodes/sh-script.el	Sat Oct 24 20:30:44 2009 +0000
+++ b/lisp/progmodes/sh-script.el	Sat Oct 24 21:15:39 2009 +0000
@@ -1109,6 +1109,9 @@
 		  (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.