[Python-mode] [ python-mode-Patches-1194875 ] better (and more) coloring

SourceForge.net noreply at sourceforge.net
Wed May 4 02:46:44 CEST 2005

Patches item #1194875, was opened at 2005-05-04 02:44
Message generated for change (Comment added) made by jonaskoelker
You can respond by visiting: 

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jonas Kölker (jonaskoelker)
Assigned to: Nobody/Anonymous (nobody)
Summary: better (and more) coloring

Initial Comment:
this patch fixes some coloring problems. It's made
against 4.70 (I diffed the CVS version against my
debian/sarge python-mode.el: equal)

--- fixed stuff

try:pass colors everything except the :
(same for except and finally)
they still color the colon turquoise if there's at
least one space or newline. If colon-coloring should be
turned off, it's a simple swap-three-lines operation.

it also correctly colors str(id(type(len))); but only
(damn!) because it alternates between typenames and

fixes not coloring the last exception in a tuple (and
probably other similar things).

(imo) correctly colors ValueError in

adds set and frozenset to typenames.

--- tweakable stuff:
selecting alternate face for typenames (int, dict, type)
selecting alternate face for builtins (exceptions, len, id)
(these two defaults to kw-turquoise)

selecting alternate face for numeric literals (but
currently the RE-matching is dodgy)
selecting alternate face for the first variable name in
a for ... in (both expressions and statements) (it
should be extended to more than just the first).
(these two default to a vanilla face, 'py-plain-face)


>Comment By: Jonas Kölker (jonaskoelker)
Date: 2005-05-04 02:46

Logged In: YES 

sorry, I (something)ed up uploading the patch.

Scene 24, take 2.


You can respond by visiting: 

More information about the Python-mode mailing list