aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJefferson Carpenter2017-07-07 17:08:52 -0500
committerNoam Postavsky2017-08-25 22:50:15 -0400
commitfeecb66b6fe41c977b8e11b5f2d419c9544f42de (patch)
tree3829d65fa8600d875b4a5fbfcd09bc200d290210
parenta7ed4ec0958662265136820333da1a8fbd3a864e (diff)
downloademacs-feecb66b6fe41c977b8e11b5f2d419c9544f42de.tar.gz
emacs-feecb66b6fe41c977b8e11b5f2d419c9544f42de.zip
Support all perl variable declarators and prefixes (Bug#27613)
* lisp/progmodes/perl-mode.el (perl-imenu-generic-expression) (perl-font-lock-keywords-2): Match declators 'anon', 'argument', 'has', 'local', 'state', 'supersede', 'let', and 'temp'. Copyright-paperwork-exempt: yes
-rw-r--r--lisp/progmodes/perl-mode.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index 6197a53ee66..5e199fb0c33 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -135,7 +135,7 @@
135 '(;; Functions 135 '(;; Functions
136 (nil "^[ \t]*sub\\s-+\\([-[:alnum:]+_:]+\\)" 1) 136 (nil "^[ \t]*sub\\s-+\\([-[:alnum:]+_:]+\\)" 1)
137 ;;Variables 137 ;;Variables
138 ("Variables" "^\\(?:my\\|our\\)\\s-+\\([$@%][-[:alnum:]+_:]+\\)\\s-*=" 1) 138 ("Variables" "^[ \t]*\\(?:anon\\|argument\\|has\\|local\\|my\\|our\\|state\\|supersede\\)\\s-+\\([$@%][-[:alnum:]+_:]+\\)\\s-*=" 1)
139 ("Packages" "^[ \t]*package\\s-+\\([-[:alnum:]+_:]+\\);" 1) 139 ("Packages" "^[ \t]*package\\s-+\\([-[:alnum:]+_:]+\\);" 1)
140 ("Doc sections" "^=head[0-9][ \t]+\\(.*\\)" 1)) 140 ("Doc sections" "^=head[0-9][ \t]+\\(.*\\)" 1))
141 "Imenu generic expression for Perl mode. See `imenu-generic-expression'.") 141 "Imenu generic expression for Perl mode. See `imenu-generic-expression'.")
@@ -179,8 +179,9 @@
179 "BEGIN" "END" "return" "exec" "eval") t) 179 "BEGIN" "END" "return" "exec" "eval") t)
180 "\\>") 180 "\\>")
181 ;; 181 ;;
182 ;; Fontify local and my keywords as types. 182 ;; Fontify declarators and prefixes as types.
183 ("\\<\\(local\\|my\\)\\>" . font-lock-type-face) 183 ("\\<\\(anon\\|argument\\|has\\|local\\|my\\|our\\|state\\|supersede\\)\\>" . font-lock-type-face) ; declarators
184 ("\\<\\(let\\|temp\\)\\>" . font-lock-type-face) ; prefixes
184 ;; 185 ;;
185 ;; Fontify function, variable and file name references. 186 ;; Fontify function, variable and file name references.
186 ("&\\(\\sw+\\(::\\sw+\\)*\\)" 1 font-lock-function-name-face) 187 ("&\\(\\sw+\\(::\\sw+\\)*\\)" 1 font-lock-function-name-face)