Mercurial > cpython-lru_cache-weakref
diff Misc/python-mode.el @ 2496:60e5aaceb3eb legacy-trunk
(python-font-lock-keywords): new variable
| author | Barry Warsaw <barry@python.org> |
|---|---|
| date | Wed, 08 Mar 1995 22:02:44 +0000 |
| parents | 718c65d0e12d |
| children | 15a86687f838 |
line wrap: on
line diff
--- a/Misc/python-mode.el Wed Mar 08 21:50:28 1995 +0000 +++ b/Misc/python-mode.el Wed Mar 08 22:02:44 1995 +0000 @@ -165,6 +165,33 @@ 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.")) ;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
