From aa7aaf8f0bf845b57961dff1b702098e50cb16ee Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 9 Jul 2012 09:54:50 -0400 Subject: [PATCH] * lisp/progmodes/sh-script.el (sh-syntax-propertize-function): Fix last change. Fixes: debbugs:11826 --- lisp/ChangeLog | 9 +++++++-- lisp/progmodes/sh-script.el | 8 ++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e5f4bb8f770..1faebf5b083 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-07-09 Stefan Monnier + + * progmodes/sh-script.el (sh-syntax-propertize-function): Fix last + change (bug#11826). + 2012-07-02 Glenn Morris * simple.el (kill-whole-line): Doc tweak. @@ -11,8 +16,8 @@ 2012-06-28 Andreas Schwab - * calendar/cal-dst.el (calendar-current-time-zone): Return - calendar-current-time-zone-cache if non-nil. + * calendar/cal-dst.el (calendar-current-time-zone): + Return calendar-current-time-zone-cache if non-nil. 2012-06-25 Masatake YAMATO diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 48b19524b8c..7d38df6aff6 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1105,12 +1105,12 @@ subshells can nest." (")" (0 (sh-font-lock-paren (match-beginning 0)))) ;; Highlight (possibly nested) subshells inside "" quoted ;; regions correctly. - ("\"\\(?:\\(?:[^\\\"]\\|\\)*?[^\\]\\(?:\\\\\\\\\\)*\\)??\\(\\$(\\|`\\)" + ("\"\\(?:\\(?:[^\\\"]\\|\\\\.\\)*?\\)??\\(\\$(\\|`\\)" (1 (ignore - ;; Save excursion because we want to also apply other - ;; syntax-propertize rules within the affected region. - (if (nth 8 (syntax-ppss)) + (if (nth 8 (save-excursion (syntax-ppss (match-beginning 0)))) (goto-char (1+ (match-beginning 0))) + ;; Save excursion because we want to also apply other + ;; syntax-propertize rules within the affected region. (save-excursion (sh-font-lock-quoted-subshell end))))))) (point) end)) -- 2.39.2