GNU bug report logs - #6445
[PATCH] python-font-lock-keywords: Highlight top-level augmented assignments

Previous Next

Package: emacs;

Reported by: Deniz Dogan <deniz.a.m.dogan <at> gmail.com>

Date: Thu, 17 Jun 2010 15:10:03 UTC

Severity: minor

Tags: patch

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6445 in the body.
You can then email your comments to 6445 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6445; Package emacs. (Thu, 17 Jun 2010 15:10:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Deniz Dogan <deniz.a.m.dogan <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 17 Jun 2010 15:10:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Deniz Dogan <deniz.a.m.dogan <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org, Emacs-Devel devel <emacs-devel <at> gnu.org>
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




Severity set to 'minor' from 'normal' Request was from Deniz Dogan <deniz.a.m.dogan <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 24 Jun 2010 22:52:01 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6445; Package emacs. (Sun, 21 Nov 2010 17:10:02 GMT) Full text and rfc822 format available.

Message #10 received at 6445 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Deniz Dogan <deniz.a.m.dogan <at> gmail.com>
Cc: 6445 <at> debbugs.gnu.org
Subject: Re: [PATCH] python-font-lock-keywords: Highlight top-level augmented
	assignments
Date: Sun, 21 Nov 2010 12:14:13 -0500
> 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.




bug closed, send any further explanations to Deniz Dogan <deniz.a.m.dogan <at> gmail.com> Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> debbugs.gnu.org. (Sun, 21 Nov 2010 17:10:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 20 Dec 2010 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 243 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.