]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/cperl-mode.el (cperl-mode): Yet another fix for
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 6 Aug 2012 17:41:32 +0000 (13:41 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 6 Aug 2012 17:41:32 +0000 (13:41 -0400)
syntax-propertize-function.

Fixes: debbugs:10095
lisp/ChangeLog
lisp/progmodes/cperl-mode.el

index 635ecc054dd23414d3a8d84c618e9f1e8ef0b264..a4a5ab7eb396eac09165a417b73441f476af31b4 100644 (file)
@@ -1,3 +1,8 @@
+2012-08-06  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * progmodes/cperl-mode.el (cperl-mode): Yet another fix for
+       syntax-propertize-function (bug#10095).
+
 2012-07-28  Chong Yidong  <cyd@gnu.org>
 
        * progmodes/gdb-mi.el (gdb-place-breakpoints): Fix the call to
@@ -15,8 +20,8 @@
 
 2012-07-21  Leo Liu  <sdl.web@gmail.com>
 
-       * 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  <sdl.web@gmail.com>
 
index 58cbf26496d92fa244eb6964bcdba8047721cc5d..9c329a8902edc560322f75ae4f0063d70b80bea2 100644 (file)
@@ -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)