emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master feecb66 2/2: Support all perl variable declarators


From: Noam Postavsky
Subject: [Emacs-diffs] master feecb66 2/2: Support all perl variable declarators and prefixes (Bug#27613)
Date: Fri, 25 Aug 2017 23:07:18 -0400 (EDT)

branch: master
commit feecb66b6fe41c977b8e11b5f2d419c9544f42de
Author: Jefferson Carpenter <address@hidden>
Commit: Noam Postavsky <address@hidden>

    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
---
 lisp/progmodes/perl-mode.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index 6197a53..5e199fb 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -135,7 +135,7 @@
   '(;; Functions
     (nil "^[ \t]*sub\\s-+\\([-[:alnum:]+_:]+\\)" 1)
     ;;Variables
-    ("Variables" 
"^\\(?:my\\|our\\)\\s-+\\(address@hidden:alnum:]+_:]+\\)\\s-*=" 1)
+    ("Variables" "^[ 
\t]*\\(?:anon\\|argument\\|has\\|local\\|my\\|our\\|state\\|supersede\\)\\s-+\\(address@hidden:alnum:]+_:]+\\)\\s-*="
 1)
     ("Packages" "^[ \t]*package\\s-+\\([-[:alnum:]+_:]+\\);" 1)
     ("Doc sections" "^=head[0-9][ \t]+\\(.*\\)" 1))
   "Imenu generic expression for Perl mode.  See `imenu-generic-expression'.")
@@ -179,8 +179,9 @@
                             "BEGIN" "END" "return" "exec" "eval") t)
               "\\>")
      ;;
-     ;; Fontify local and my keywords as types.
-     ("\\<\\(local\\|my\\)\\>" . font-lock-type-face)
+     ;; Fontify declarators and prefixes as types.
+     
("\\<\\(anon\\|argument\\|has\\|local\\|my\\|our\\|state\\|supersede\\)\\>" . 
font-lock-type-face) ; declarators
+     ("\\<\\(let\\|temp\\)\\>" . font-lock-type-face) ; prefixes
      ;;
      ;; Fontify function, variable and file name references.
      ("&\\(\\sw+\\(::\\sw+\\)*\\)" 1 font-lock-function-name-face)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]