(python-font-lock-keywords): better defaults.

This commit is contained in:
Barry Warsaw 1995-03-08 22:25:47 +00:00
parent 74d9cc5b73
commit 65bc7a7bf2
1 changed files with 22 additions and 25 deletions

View File

@ -166,31 +166,28 @@ displayed in the echo area, and if `py-beep-if-tab-change' is non-nil
the Emacs bell is also rung as a warning.") the Emacs bell is also rung as a warning.")
(defvar python-font-lock-keywords (defvar python-font-lock-keywords
(purecopy (list
(list (cons
(cons (concat
(concat "\\<\\("
"\\<\\(" (mapconcat
(mapconcat 'identity
'identity '("access" "and" "break" "continue"
'( "del" "elif" "else" "except"
"access" "and" "break" "exec" "finally" "for" "from"
"continue" "del" "elif" "global" "if" "import" "in"
"else:" "except" "except:" "exec" "is" "lambda" "not" "or"
"finally:" "for" "from" "global" "pass" "print" "raise" "return"
"if" "import" "in" "is" "try" "while" "def" "class"
"lambda" "not" "or" "pass" )
"print" "raise" "return" "try:" "\\|")
"while" "\\)\\>")
) 1)
"\\|") ;; functions
"\\)\\>") '("\\bdef\\s +\\(\\sw+\\)(" 1 font-lock-function-name-face)
1) ;; classes
;; functions '("\\bclass\\s +\\(\\sw+\\)[(:]" 1 font-lock-function-name-face)
'("\\bdef\\s +\\(\\sw+\\)(" 1 font-lock-function-name-face) )
;; classes
'("\\bclass\\s +\\(\\sw+\\)[(:]" 1 font-lock-function-name-face)
))
"*Additional keywords to highlight `python-mode' buffers.") "*Additional keywords to highlight `python-mode' buffers.")