GNU bug report logs - #11739
24.1; cperl font-lock (highlighting) bug with dollar+quote sequence ('...$')

Previous Next

Package: emacs;

Reported by: Vincent Lefevre <vincent <at> vinc17.net>

Date: Tue, 19 Jun 2012 10:28:02 UTC

Severity: normal

Found in version 24.1

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

Full log


Message #13 received at 11739-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Vincent Lefevre <vincent <at> vinc17.net>
Cc: 11739-done <at> debbugs.gnu.org
Subject: Re: bug#11739: 24.1;
	font-lock (highlighting) bug with dollar+quote sequence ('...$')
Date: Thu, 21 Jun 2012 12:52:52 -0400
> The first "and print ..." line is correctly highlighted, but not the
> second one. It seems that CPerl is confused by a $ at the end of a
> single-quote string literal.

Actually, cperl recognizes these just fine, but there was some
miscommunication between cperl and syntax-propertize so one ended up
removing something expecting the other would refresh it, but without
telling it.
It should be fixed now on the emacs-24 branch.


        Stefan


--- lisp/progmodes/cperl-mode.el	2012-01-19 07:21:25 +0000
+++ lisp/progmodes/cperl-mode.el	2012-06-21 16:41:01 +0000
@@ -8951,11 +8951,12 @@
       (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
+  (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)))
-      (progn
 	(save-excursion
 	  (goto-char from)
 	  (cperl-fontify-syntaxically to)))))





This bug report was last modified 13 years and 30 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.