comparison 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
comparison
equal deleted inserted replaced
105752:26d5ef08acf0 105753:cdd9e1b1a30f
1107 (and (sh-is-quoted-p (1- (point))) 1107 (and (sh-is-quoted-p (1- (point)))
1108 (goto-char (- (point) 2))) 1108 (goto-char (- (point) 2)))
1109 (when (memq (char-before) '(?\" ?\')) 1109 (when (memq (char-before) '(?\" ?\'))
1110 (condition-case nil (progn (backward-sexp 1) t) 1110 (condition-case nil (progn (backward-sexp 1) t)
1111 (error nil))))) 1111 (error nil)))))
1112 ;; Patterns can be preceded by an open-paren (Bug#1320).
1113 (if (= (char-before (point)) ?\()
1114 (backward-char 1))
1112 (while (progn 1115 (while (progn
1113 (forward-comment (- (point-max))) 1116 (forward-comment (- (point-max)))
1114 ;; Maybe we've bumped into an escaped newline. 1117 ;; Maybe we've bumped into an escaped newline.
1115 (sh-is-quoted-p (point))) 1118 (sh-is-quoted-p (point)))
1116 (backward-char 1)) 1119 (backward-char 1))