diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/progmodes/python.el | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1a4866612dc..39454198a64 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-11-21 Deniz Dogan <deniz.a.m.dogan@gmail.com> + + * progmodes/python.el (python-font-lock-keywords): Highlight + top-level augmented assignments (Bug#6445). + 2010-11-21 Jan Djärv <jan.h.d@swipnet.se> * term/ns-win.el (ns-right-control-modifier) 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 ?_)) |