diff options
| author | Chong Yidong | 2010-01-05 15:11:04 -0700 |
|---|---|---|
| committer | Chong Yidong | 2010-01-05 15:11:04 -0700 |
| commit | fd579fdca5cb3a71cdb24bace02c335d838a6922 (patch) | |
| tree | ffdf43b4c73b37126a0d47b30ae78cf9a3b0fb10 | |
| parent | 37860cafd5acdc2348675f2e9bc1a0934a55f30d (diff) | |
| download | emacs-fd579fdca5cb3a71cdb24bace02c335d838a6922.tar.gz emacs-fd579fdca5cb3a71cdb24bace02c335d838a6922.zip | |
* progmodes/python.el (python-font-lock-keywords): Handle qualified decorators
(Bug#881).
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/progmodes/python.el | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2dc2a1270bd..2827ff8d9d5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-01-05 Tom Tromey <tromey@redhat.com> | ||
| 2 | |||
| 3 | * progmodes/python.el (python-font-lock-keywords): Handle | ||
| 4 | qualified decorators (Bug#881). | ||
| 5 | |||
| 1 | 2010-01-05 Dan Nicolaescu <dann@ics.uci.edu> | 6 | 2010-01-05 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 7 | ||
| 3 | * vc-bzr.el (vc-bzr-working-revision): Fix looking for a revision | 8 | * vc-bzr.el (vc-bzr-working-revision): Fix looking for a revision |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 104ea26689f..94124ad54f0 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; python.el --- silly walks for Python -*- coding: iso-8859-1 -*- | 1 | ;;; python.el --- silly walks for Python -*- coding: iso-8859-1 -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 | 3 | ;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Dave Love <fx@gnu.org> | 6 | ;; Author: Dave Love <fx@gnu.org> |
| @@ -112,7 +112,9 @@ | |||
| 112 | ;; Top-level assignments are worth highlighting. | 112 | ;; Top-level assignments are worth highlighting. |
| 113 | (,(rx line-start (group (1+ (or word ?_))) (0+ space) "=") | 113 | (,(rx line-start (group (1+ (or word ?_))) (0+ space) "=") |
| 114 | (1 font-lock-variable-name-face)) | 114 | (1 font-lock-variable-name-face)) |
| 115 | (,(rx line-start (* (any " \t")) (group "@" (1+ (or word ?_)))) ; decorators | 115 | ;; Decorators. |
| 116 | (,(rx line-start (* (any " \t")) (group "@" (1+ (or word ?_)) | ||
| 117 | (0+ "." (1+ (or word ?_))))) | ||
| 116 | (1 font-lock-type-face)) | 118 | (1 font-lock-type-face)) |
| 117 | ;; Built-ins. (The next three blocks are from | 119 | ;; Built-ins. (The next three blocks are from |
| 118 | ;; `__builtin__.__dict__.keys()' in Python 2.5.1.) These patterns | 120 | ;; `__builtin__.__dict__.keys()' in Python 2.5.1.) These patterns |