From: Chong Yidong Date: Sat, 24 Oct 2009 21:15:39 +0000 (+0000) Subject: * progmodes/sh-script.el (sh-font-lock-paren): Handle case X-Git-Tag: emacs-pretest-23.1.90~663 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3e8ae8a6346e5c58d56dc99f632baaf02e255b7a;p=emacs.git * progmodes/sh-script.el (sh-font-lock-paren): Handle case patterns that are preceded by an open-paren (Bug#1320). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5387cfd080e..96db1cd6075 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2009-10-24 Chong Yidong + + * progmodes/sh-script.el (sh-font-lock-paren): Handle case + patterns that are preceded by an open-paren (Bug#1320). + 2009-10-24 Sven Joachim * files.el (delete-directory): Delete symlinks to directories with 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.