[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#11739: 24.1; font-lock (highlighting) bug with dollar+quote sequence
From: |
Stefan Monnier |
Subject: |
bug#11739: 24.1; font-lock (highlighting) bug with dollar+quote sequence ('...$') |
Date: |
Thu, 21 Jun 2012 12:52:52 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
> 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)))))