From 3e8ae8a6346e5c58d56dc99f632baaf02e255b7a Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 24 Oct 2009 21:15:39 +0000 Subject: [PATCH] * progmodes/sh-script.el (sh-font-lock-paren): Handle case patterns that are preceded by an open-paren (Bug#1320). --- lisp/ChangeLog | 5 +++++ lisp/progmodes/sh-script.el | 3 +++ 2 files changed, 8 insertions(+) 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. -- 2.39.5