]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/cperl-mode.el
Merge from emacs-24; up to 2012-04-30T11:57:47Z!sdl.web@gmail.com
[gnu-emacs] / lisp / progmodes / cperl-mode.el
index e95b6fa288d3038c3cd7db352126943af642f35f..f04994249527a4951a852676b3d7e0625eae4cda 100644 (file)
@@ -8950,14 +8950,15 @@ do extra unwind via `cperl-unwind-to-safe'."
       (setq cperl-syntax-done-to (min cperl-syntax-done-to beg))))
 
 (defun cperl-update-syntaxification (from to)
-  (if (and cperl-use-syntax-table-text-property
-          cperl-syntaxify-by-font-lock
-          (or (null cperl-syntax-done-to)
-              (< cperl-syntax-done-to to)))
-      (progn
-       (save-excursion
-         (goto-char from)
-         (cperl-fontify-syntaxically to)))))
+  (cond
+   ((not cperl-use-syntax-table-text-property) nil)
+   ((fboundp 'syntax-propertize) (syntax-propertize to))
+   ((and cperl-syntaxify-by-font-lock
+         (or (null cperl-syntax-done-to)
+             (< cperl-syntax-done-to to)))
+    (save-excursion
+      (goto-char from)
+      (cperl-fontify-syntaxically to)))))
 
 (defvar cperl-version
   (let ((v  "Revision: 6.2"))