unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] python-font-lock-keywords: Highlight top-level augmented  assignments
@ 2010-06-17 15:01 Deniz Dogan
  2010-11-21 17:14 ` bug#6445: " Chong Yidong
  0 siblings, 1 reply; 2+ messages in thread
From: Deniz Dogan @ 2010-06-17 15:01 UTC (permalink / raw)
  To: bug-gnu-emacs, Emacs-Devel devel

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#6445: [PATCH] python-font-lock-keywords: Highlight top-level augmented assignments
  2010-06-17 15:01 [PATCH] python-font-lock-keywords: Highlight top-level augmented assignments Deniz Dogan
@ 2010-11-21 17:14 ` Chong Yidong
  0 siblings, 0 replies; 2+ messages in thread
From: Chong Yidong @ 2010-11-21 17:14 UTC (permalink / raw)
  To: Deniz Dogan; +Cc: 6445

> 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.

Since no one else has made any comment about this patch during the last
few months, and it looks reasonable to this non-Python-expert, I've gone
ahead and committed it to trunk.  Thanks.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-21 17:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-17 15:01 [PATCH] python-font-lock-keywords: Highlight top-level augmented assignments Deniz Dogan
2010-11-21 17:14 ` bug#6445: " Chong Yidong

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).