diff options
| author | Chong Yidong <cyd@stupidchicken.com> | 2010-11-21 12:12:44 -0500 |
|---|---|---|
| committer | Chong Yidong <cyd@stupidchicken.com> | 2010-11-21 12:12:44 -0500 |
| commit | 4e2f7d2a68a1849a1b8ef5488afbd2c0dadd1e80 (patch) | |
| tree | 960dc2d31bd466a29d176d2239b93d95d6733199 /lisp/progmodes/python.el | |
| parent | 731e263a732a84174bf324f48720e4645ab4b9b1 (diff) | |
Highlight top-level augmented assignments in Python (Bug#6445).
* progmodes/python.el (python-font-lock-keywords): Highlight
top-level augmented assignments (Bug#6445).
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 7754dc6c87c..9fe57beec30 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -110,7 +110,8 @@ (,(rx symbol-start (group "def") (1+ space) (group (1+ (or word ?_)))) (1 font-lock-keyword-face) (2 font-lock-function-name-face)) ;; Top-level assignments are worth highlighting. - (,(rx line-start (group (1+ (or word ?_))) (0+ space) "=") + (,(rx line-start (group (1+ (or word ?_))) (0+ space) + (opt (or "+" "-" "*" "**" "/" "//" "&" "%" "|" "^" "<<" ">>")) "=") (1 font-lock-variable-name-face)) ;; Decorators. (,(rx line-start (* (any " \t")) (group "@" (1+ (or word ?_)) |
