emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] python-font-lock-keywords: Highlight top-level augmented assign


From: Deniz Dogan
Subject: [PATCH] python-font-lock-keywords: Highlight top-level augmented assignments
Date: Thu, 17 Jun 2010 17:01:43 +0200

The variable names in top-level variable assignments are currently
highlighted with font-lock-variable-name-face. However, augmented
assignments are not supported, i.e. things such as +=, -=, etc.

I don't have any diff-like program at the moment, so please accept my faked one:

L113 python.el:
-    (,(rx line-start (group (1+ (or word ?_))) (0+ space) "=")
+    (,(rx line-start (group (1+ (or word ?_))) (0+ space)
+          (opt (or "+" "-" "*" "**" "/" "//" "&" "%" "|" "^" "<<" ">>")) "=")

Documentation: 
http://docs.python.org/reference/simple_stmts.html#grammar-token-augmented_assignment_stmt

--
Deniz Dogan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]