# HG changeset patch # User Stefan Monnier # Date 1132611853 0 # Node ID 962ab95567f05f174bf25edc7d5df3a94bf55a00 # Parent 98209bb8d1a8a0edfe02ebf351c7717daa56df22 (sh-font-lock-paren): Handle continued lines in patterns. diff -r 98209bb8d1a8 -r 962ab95567f0 lisp/ChangeLog --- a/lisp/ChangeLog Mon Nov 21 21:52:20 2005 +0000 +++ b/lisp/ChangeLog Mon Nov 21 22:24:13 2005 +0000 @@ -1,3 +1,8 @@ +2005-11-21 Stefan Monnier + + * progmodes/sh-script.el (sh-font-lock-paren): Handle continued lines + in patterns. + 2005-11-21 Juri Linkov * custom.el (defcustom): Update link types in docstring. diff -r 98209bb8d1a8 -r 962ab95567f0 lisp/progmodes/sh-script.el --- a/lisp/progmodes/sh-script.el Mon Nov 21 21:52:20 2005 +0000 +++ b/lisp/progmodes/sh-script.el Mon Nov 21 22:24:13 2005 +0000 @@ -986,7 +986,11 @@ (when (memq (char-before) '(?\" ?\')) (condition-case nil (progn (backward-sexp 1) t) (error nil))))) - (forward-comment (- (point-max))) + (while (progn + (forward-comment (- (point-max))) + ;; Maybe we've bumped into an escaped newline. + (sh-is-quoted-p (point))) + (backward-char 1)) (when (eq (char-before) ?|) (backward-char 1) t))) (when (save-excursion (backward-char 2) (looking-at ";;\\|in"))