Mercurial > emacs
comparison lisp/progmodes/python.el @ 106743:2db50e698b85
* progmodes/python.el (python-font-lock-keywords): Handle qualified decorators
(Bug#881).
| author | Chong Yidong <cyd@stupidchicken.com> |
|---|---|
| date | Tue, 05 Jan 2010 15:11:04 -0700 |
| parents | 427e81917607 |
| children | 66e0d01014c6 |
comparison
equal
deleted
inserted
replaced
| 106742:debedd261607 | 106743:2db50e698b85 |
|---|---|
| 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> |
| 7 ;; Maintainer: FSF | 7 ;; Maintainer: FSF |
| 8 ;; Created: Nov 2003 | 8 ;; Created: Nov 2003 |
| 110 (,(rx symbol-start (group "def") (1+ space) (group (1+ (or word ?_)))) | 110 (,(rx symbol-start (group "def") (1+ space) (group (1+ (or word ?_)))) |
| 111 (1 font-lock-keyword-face) (2 font-lock-function-name-face)) | 111 (1 font-lock-keyword-face) (2 font-lock-function-name-face)) |
| 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 |
| 119 ;; are debateable, but they at least help to spot possible | 121 ;; are debateable, but they at least help to spot possible |
| 120 ;; shadowing of builtins. | 122 ;; shadowing of builtins. |
