changeset 67069:962ab95567f0

(sh-font-lock-paren): Handle continued lines in patterns.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 21 Nov 2005 22:24:13 +0000
parents 98209bb8d1a8
children c83903b9e676
files lisp/ChangeLog lisp/progmodes/sh-script.el
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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  <monnier@iro.umontreal.ca>
+
+	* progmodes/sh-script.el (sh-font-lock-paren): Handle continued lines
+	in patterns.
+
 2005-11-21  Juri Linkov  <juri@jurta.org>
 
 	* custom.el (defcustom): Update link types in docstring.
--- 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"))