Commit 65bc7a7b authored by Barry Warsaw's avatar Barry Warsaw

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

parent 74d9cc5b
...@@ -166,22 +166,19 @@ displayed in the echo area, and if `py-beep-if-tab-change' is non-nil ...@@ -166,22 +166,19 @@ 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"
"access" "and" "break" "del" "elif" "else" "except"
"continue" "del" "elif" "exec" "finally" "for" "from"
"else:" "except" "except:" "exec" "global" "if" "import" "in"
"finally:" "for" "from" "global" "is" "lambda" "not" "or"
"if" "import" "in" "is" "pass" "print" "raise" "return"
"lambda" "not" "or" "pass" "try" "while" "def" "class"
"print" "raise" "return" "try:"
"while"
) )
"\\|") "\\|")
"\\)\\>") "\\)\\>")
...@@ -190,7 +187,7 @@ the Emacs bell is also rung as a warning.") ...@@ -190,7 +187,7 @@ the Emacs bell is also rung as a warning.")
'("\\bdef\\s +\\(\\sw+\\)(" 1 font-lock-function-name-face) '("\\bdef\\s +\\(\\sw+\\)(" 1 font-lock-function-name-face)
;; classes ;; classes
'("\\bclass\\s +\\(\\sw+\\)[(:]" 1 font-lock-function-name-face) '("\\bclass\\s +\\(\\sw+\\)[(:]" 1 font-lock-function-name-face)
)) )
"*Additional keywords to highlight `python-mode' buffers.") "*Additional keywords to highlight `python-mode' buffers.")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment