diff options
author | Barry Warsaw <barry@python.org> | 1995-03-08 22:02:44 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 1995-03-08 22:02:44 (GMT) |
commit | 4f005cf5d67193d5b4e24b102c51f65b162eae5c (patch) | |
tree | aca6a2152ab855f43ab411d2322dc44832e510fc /Misc/python-mode.el | |
parent | 850437a93279beddbfa808821369ad15b9bb5bbd (diff) | |
download | cpython-4f005cf5d67193d5b4e24b102c51f65b162eae5c.zip cpython-4f005cf5d67193d5b4e24b102c51f65b162eae5c.tar.gz cpython-4f005cf5d67193d5b4e24b102c51f65b162eae5c.tar.bz2 |
(python-font-lock-keywords): new variable
Diffstat (limited to 'Misc/python-mode.el')
-rw-r--r-- | Misc/python-mode.el | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Misc/python-mode.el b/Misc/python-mode.el index 84be62e..06656cc 100644 --- a/Misc/python-mode.el +++ b/Misc/python-mode.el @@ -165,6 +165,33 @@ equal <number>, `tab-width' is set to <number>, a message saying so is 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) + ) + "*Additional keywords to highlight `python-mode' buffers.")) ;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |