[Python-mode] can't get variable syntax highlighting to work
Barry Warsaw
barry at python.org
Fri Jun 11 22:32:42 CEST 2010
On May 30, 2010, at 02:20 AM, Micah wrote:
>I'm shifting from a perl and java coding environment to a python and django
>(templates) world (along with a fair bit of css, js, etc) and I'm trying to
>push, shove, coerce as best I can my background of an emacs user (let me
>emphatically state, I've always been a user of emacs/elisp, never a hacker).
>I'm using GNU emacs, not only that I'm now trying to use the super-easy
>http://emacsformacosx.com/ version (23.2) and python-mode.el (5.1.0 from
>https://launchpad.net/python-mode).
>
>My problem: while I've gotten python-mode.el to work, I can't get all syntax
>highlighting to work, most particular variable highlighting. I have
>christmas tree mode on. If I disable python-mode, I get the (what I
>consider) inferior highlighting from python.el working, but the tabbing in
>that mode is awful.
>
>I'm very confused, and have spent way too much time crawling the web for an
>answer. If you guys have any easy clues, I'd gladly take them.
I'm not sure python-mode.el actually provides variable syntax highlighting. I
don't have it turned on and I don't see in the code where that's supported,
but I could have missed something (it's Friday after all :).
I see this in python.el:
;; Top-level assignments are worth highlighting.
(,(rx line-start (group (1+ (or word ?_))) (0+ space) "=")
(1 font-lock-variable-name-face))
Maybe some elisp hacker would like to add support for this into
python-mode.el?
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-mode/attachments/20100611/306bc09a/attachment.pgp>
More information about the Python-mode
mailing list