Variable: perl-font-lock-keywords-2
perl-font-lock-keywords-2 is a variable defined in perl-mode.el.gz.
Value
(("&\\(\\sw+\\(::\\sw+\\)*\\)" 1 'font-lock-function-name-face)
("[$*]{?\\(\\sw+\\(::\\sw+\\)*\\)" 1 'font-lock-variable-name-face)
("\\([@%]\\|\\$#\\)\\(\\sw+\\(::\\sw+\\)*\\)"
(2 'perl-non-scalar-variable))
("\\<\\(package\\|sub\\)\\>[ ]*\\(\\(?:\\sw\\|::\\)+\\)?"
(1 'font-lock-keyword-face) (2 'font-lock-function-name-face nil t))
("\\(?:^\\|[^$@%&\\]\\)\\<\\(import\\|no\\|require\\|use\\)\\>[ ]*\\(\\(?:\\sw\\|::\\)+\\)?"
(1 'font-lock-keyword-face) (2 'font-lock-constant-face nil t))
"\\<\\(BEGIN\\|END\\|d\\(?:efault\\|ie\\|o\\|ump\\)\\|e\\(?:ls\\(?:e\\|if\\)\\|val\\|x\\(?:ec\\|it\\)\\)\\|for\\(?:each\\)?\\|given\\|if\\|return\\|un\\(?:less\\|til\\)\\|wh\\(?:en\\|ile\\)\\)\\>"
("\\<\\(has\\|local\\|my\\|our\\|state\\)\\>" quote
font-lock-keyword-face)
("<\\(\\sw+\\)>" 1 'font-lock-constant-face)
("\\<\\(continue\\|goto\\|last\\|next\\|redo\\)\\>[ ]*\\(\\sw+\\)?"
(1 'font-lock-keyword-face) (2 'font-lock-constant-face nil t))
("^[ ]*\\(\\sw+\\)[ ]*:[^:]" 1 'font-lock-constant-face))
Documentation
Gaudy level highlighting for Perl mode.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/perl-mode.el.gz
(defconst perl-font-lock-keywords-2
(append
'(;; Fontify function, variable and file name references. They have to be
;; handled first because they might conflict with keywords.
("&\\(\\sw+\\(::\\sw+\\)*\\)" 1 'font-lock-function-name-face)
;; Additionally fontify non-scalar variables. `perl-non-scalar-variable'
;; will underline them by default.
("[$*]{?\\(\\sw+\\(::\\sw+\\)*\\)" 1 'font-lock-variable-name-face)
("\\([@%]\\|\\$#\\)\\(\\sw+\\(::\\sw+\\)*\\)"
(2 'perl-non-scalar-variable)))
perl-font-lock-keywords-1
`( ;; Fontify keywords, except those fontified otherwise.
,(concat "\\<"
(regexp-opt '("if" "until" "while" "elsif" "else" "unless"
"do" "dump" "for" "foreach" "exit" "die"
"BEGIN" "END" "return" "exec" "eval"
"when" "given" "default")
t)
"\\>")
;;
;; Fontify declarators and prefixes as types.
("\\<\\(has\\|local\\|my\\|our\\|state\\)\\>" . 'font-lock-keyword-face) ; declarators
("<\\(\\sw+\\)>" 1 'font-lock-constant-face)
;;
;; Fontify keywords with/and labels as we do in `c++-font-lock-keywords'.
("\\<\\(continue\\|goto\\|last\\|next\\|redo\\)\\>[ \t]*\\(\\sw+\\)?"
(1 'font-lock-keyword-face) (2 'font-lock-constant-face nil t))
("^[ \t]*\\(\\sw+\\)[ \t]*:[^:]" 1 'font-lock-constant-face)))
"Gaudy level highlighting for Perl mode.")