home *** CD-ROM | disk | FTP | other *** search
- I didn't notice any mention of the addition of perl mode to
- the font-lock code in the NEWS file, so I was sort of wondering why my
- perl font lock stuff wasn't working correctly anymore...until this
- morning. It kind of looks like Jamie based the perl-font-lock-keywords
- in font-lock.el on an early version that I posted before I got
- it to work right. This one looks much nicer:
-
- (defconst perl-font-lock-keywords
- (list
- (cons
- (concat "[ \n\t{]*\\("
- (mapconcat 'identity
- '("if" "until" "while" "elsif" "else" "unless" "for"
- "foreach" "continue" "exit" "die" "last" "goto"
- "next" "redo" "return" "local" "exec")
- "\\|")
- "\\)[ \n\t;(]")
- 1)
- (mapconcat 'identity
- '("#endif" "#else" "#ifdef" "#ifndef" "#if" "#include"
- "#define" "#undef")
- "\\|")
- '("^[ \n\t]*sub[ \t]+\\([^ \t{]+\\)[ \n\t]*\\{" 1 font-lock-function-name-face)
- '("[ \n\t{]*\\(eval\\)[ \n\t(;]" 1 font-lock-function-name-face)
- '("\\(--- .* ---\\|=== .* ===\\)" 1 font-lock-doc-string-face)
- )
- "Additional expressions to highlight in Perl-mode.")
-
-
- BTW, the last line is a carry-over from lightbrite to
- highlight that regexp in comment lines...which of course doesn't work
- in font-lock mode. If there's a way to make that work, could someone
- let me know. If not, Jamie should probably just take it out of the
- defs in font-lock.el.
-
-
- FYI,
- Michael
- lamour@mitre.org
-
-