summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1995-03-08 22:25:47 (GMT)
committerBarry Warsaw <barry@python.org>1995-03-08 22:25:47 (GMT)
commit65bc7a7bf209c1c33ed13240f7bdd294d23a6257 (patch)
treef9b819f084fcef77e231237a8d773a19cc16f1e5
parent74d9cc5b7371c1d6907a1cc525a8212723b81c26 (diff)
downloadcpython-65bc7a7bf209c1c33ed13240f7bdd294d23a6257.zip
cpython-65bc7a7bf209c1c33ed13240f7bdd294d23a6257.tar.gz
cpython-65bc7a7bf209c1c33ed13240f7bdd294d23a6257.tar.bz2
(python-font-lock-keywords): better defaults.
-rw-r--r--Misc/python-mode.el47
1 files changed, 22 insertions, 25 deletions
diff --git a/Misc/python-mode.el b/Misc/python-mode.el
index 43a43e3..a1ff2c7 100644
--- a/Misc/python-mode.el
+++ b/Misc/python-mode.el
@@ -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.")
(defvar python-font-lock-keywords
- (purecopy
- (list
- (cons
- (concat
- "\\<\\("
- (mapconcat
- 'identity
- '(
- "access" "and" "break"
- "continue" "del" "elif"
- "else:" "except" "except:" "exec"
- "finally:" "for" "from" "global"
- "if" "import" "in" "is"
- "lambda" "not" "or" "pass"
- "print" "raise" "return" "try:"
- "while"
- )
- "\\|")
- "\\)\\>")
- 1)
- ;; functions
- '("\\bdef\\s +\\(\\sw+\\)(" 1 font-lock-function-name-face)
- ;; classes
- '("\\bclass\\s +\\(\\sw+\\)[(:]" 1 font-lock-function-name-face)
- ))
+ (list
+ (cons
+ (concat
+ "\\<\\("
+ (mapconcat
+ 'identity
+ '("access" "and" "break" "continue"
+ "del" "elif" "else" "except"
+ "exec" "finally" "for" "from"
+ "global" "if" "import" "in"
+ "is" "lambda" "not" "or"
+ "pass" "print" "raise" "return"
+ "try" "while" "def" "class"
+ )
+ "\\|")
+ "\\)\\>")
+ 1)
+ ;; functions
+ '("\\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.")