From 638eaeb924506f36781213e71e02632660f71844 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 6 Aug 2012 13:41:32 -0400 Subject: [PATCH] * lisp/progmodes/cperl-mode.el (cperl-mode): Yet another fix for syntax-propertize-function. Fixes: debbugs:10095 --- lisp/ChangeLog | 9 +++++++-- lisp/progmodes/cperl-mode.el | 8 +++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 635ecc054dd..a4a5ab7eb39 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-08-06 Stefan Monnier + + * progmodes/cperl-mode.el (cperl-mode): Yet another fix for + syntax-propertize-function (bug#10095). + 2012-07-28 Chong Yidong * progmodes/gdb-mi.el (gdb-place-breakpoints): Fix the call to @@ -15,8 +20,8 @@ 2012-07-21 Leo Liu - * progmodes/cc-cmds.el (c-defun-name): Use - match-string-no-properties instead for consistency. + * progmodes/cc-cmds.el (c-defun-name): + Use match-string-no-properties instead for consistency. 2012-07-20 Leo Liu diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 58cbf26496d..9c329a8902e 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -1838,7 +1838,13 @@ or as help on variables `cperl-tips', `cperl-problems', (set (make-local-variable 'cperl-syntax-done-to) nil) (set (make-local-variable 'syntax-propertize-function) (lambda (start end) - (goto-char start) (cperl-fontify-syntaxically end)))) + (goto-char start) + ;; Even if cperl-fontify-syntaxically has already gone + ;; beyond `start', syntax-propertize has just removed + ;; syntax-table properties between start and end, so we have + ;; to re-apply them. + (setq cperl-syntax-done-to start) + (cperl-fontify-syntaxically end)))) (make-local-variable 'parse-sexp-lookup-properties) ;; Do not introduce variable if not needed, we check it! (set 'parse-sexp-lookup-properties t) -- 2.39.2