From bd24684be07da191e3481caaa360035e287a6bea Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 21 Nov 2005 22:24:13 +0000 Subject: [PATCH] (sh-font-lock-paren): Handle continued lines in patterns. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/sh-script.el | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a4190ab3168..5615c03547b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index bc4ca59f96a..f6928a72554 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -986,7 +986,11 @@ Point is at the beginning of the next line." (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")) -- 2.39.2