From: Stefan Monnier Date: Thu, 21 Jun 2012 16:49:21 +0000 (-0400) Subject: * lisp/progmodes/cperl-mode.el (cperl-update-syntaxification): X-Git-Tag: emacs-24.2~81 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bde2ab6f5bd2be6769f36e17fc99352382ffcc0a;p=emacs.git * lisp/progmodes/cperl-mode.el (cperl-update-syntaxification): Use syntax-propertize. Fixes: debbugs:11739 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f3fd2fc6517..c26a196ebe7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-06-21 Stefan Monnier + + * progmodes/cperl-mode.el (cperl-update-syntaxification): + Use syntax-propertize (bug#11739). + 2012-06-13 Glenn Morris * international/mule-cmds.el (mule-menu-keymap) @@ -18,13 +23,13 @@ 2012-06-01 Chong Yidong - * cus-edit.el (customize-changed-options-previous-release): Bump - to 23.4. + * cus-edit.el (customize-changed-options-previous-release): + Bump to 23.4. 2012-05-31 Stefan Monnier - * emacs-lisp/bytecomp.el (byte-compile-fix-header): Handle - arbitrary file name lengths (Bug#11585). + * emacs-lisp/bytecomp.el (byte-compile-fix-header): + Handle arbitrary file name lengths (Bug#11585). 2012-05-28 Martin Rudalics @@ -34,8 +39,8 @@ 2012-05-18 Eli Zaretskii * mail/sendmail.el (mail-yank-region): Recognize - rmail-yank-current-message in addition to insert-buffer. Fixes - mail-mode's "C-c C-r" that otherwise does nothing when invoked in + rmail-yank-current-message in addition to insert-buffer. + Fixes mail-mode's "C-c C-r" that otherwise does nothing when invoked in a *mail* buffer created through rmail-start-mail with sendmail as mail-user-agent. diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 9ea42db2a8c..2c258fb446a 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -8951,14 +8951,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"))