jrockway / cperl-mode

cperl-mode with 5.10 fixes, mx-declare support, perl6 support, etc.
102 stars 33 forks source link

Indiscriminate highlighting of scalar variables #7

Closed choroba closed 10 years ago

choroba commented 13 years ago

Scalars with package prefixes are not correctly highlighted ($Some::Package::var). Something like this should fix it:

--- cperl-mode.el       2011-06-29 18:36:02.643056200 +0200
+++ elisp/cperl-mode.el 2011-06-29 17:10:04.027108889 +0200
@@ -5934,7 +5934,7 @@
          (if cperl-highlight-variables-indiscriminately
              (setq t-font-lock-keywords-1
                    (append t-font-lock-keywords-1
-                           (list '("\\([$*]{?\\sw+\\)" 1
+                           (list '("\\([$*]{?[[:alnum:]_:]+\\)" 1
                                    font-lock-variable-name-face)))))
          (setq cperl-font-lock-keywords-1
                (if cperl-syntaxify-by-font-lock
choroba commented 10 years ago

Fixed in https://github.com/jrockway/cperl-mode/pull/18