diff lisp/progmodes/cperl-mode.el @ 110377:6dcf9897d91a

merge trunk
author Kenichi Handa <handa@m17n.org>
date Thu, 16 Sep 2010 11:11:13 +0900
parents b10051866f51
children d90a3bc6b730
line wrap: on
line diff
--- a/lisp/progmodes/cperl-mode.el	Thu Sep 16 10:51:56 2010 +0900
+++ b/lisp/progmodes/cperl-mode.el	Thu Sep 16 11:11:13 2010 +0900
@@ -1840,7 +1840,13 @@
   (make-local-variable 'cperl-syntax-state)
   (setq cperl-syntax-state nil)		; reset syntaxification cache
   (if cperl-use-syntax-table-text-property
-      (progn
+      (if (boundp 'syntax-propertize-function)
+          (progn
+            ;; Reset syntaxification cache.
+            (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))))
 	(make-local-variable 'parse-sexp-lookup-properties)
 	;; Do not introduce variable if not needed, we check it!
 	(set 'parse-sexp-lookup-properties t)