diff options
Diffstat (limited to 'lisp/progmodes/cperl-mode.el')
-rw-r--r-- | lisp/progmodes/cperl-mode.el | 8 |
1 files changed, 7 insertions, 1 deletions
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) |