Mercurial > cpython-lru_cache-weakref
diff Misc/python-mode.el @ 3746:7504884e8a74 legacy-trunk
(python-font-lock-keywords): added class and def
| author | Barry Warsaw <barry@python.org> |
|---|---|
| date | Fri, 05 Jul 1996 20:11:35 +0000 |
| parents | 6080b2ebc1f1 |
| children | ac7018b57745 |
line wrap: on
line diff
--- a/Misc/python-mode.el Wed Jul 03 23:15:51 1996 +0000 +++ b/Misc/python-mode.el Fri Jul 05 20:11:35 1996 +0000 @@ -38,6 +38,11 @@ ;; (autoload 'python-mode "python-mode" "Python editing mode." t) ;; (setq auto-mode-alist ;; (cons '("\\.py$" . python-mode) auto-mode-alist)) +;; +;; If you want font-lock support for Python source code (a.k.a. syntax +;; coloring, highlighting), add this to your .emacs file: +;; +;; (add-hook 'python-mode-hook 'turn-on-font-lock) ;; Here's a brief list of recent additions/improvements: ;; @@ -189,13 +194,14 @@ the Emacs bell is also rung as a warning.") (defconst python-font-lock-keywords - (let* ((keywords '("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" + (let* ((keywords '("access" "and" "break" "class" + "continue" "def" "del" "elif" + "else:" "except" "except:" "exec" + "finally:" "for" "from" "global" + "if" "import" "in" "is" + "lambda" "not" "or" "pass" + "print" "raise" "return" "try:" + "while" )) (kwregex (mapconcat 'identity keywords "\\|"))) (list
