unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: Steve Chapel <schapel@umich.edu>
Cc: 8639@debbugs.gnu.org
Subject: bug#8639: 23.2; emacs python mode should colorize nonlocal keyword
Date: Thu, 12 May 2011 00:13:17 +0200	[thread overview]
Message-ID: <BANLkTin-8Uy7XDGbx1cjiRGZGV-A6JbUqg@mail.gmail.com> (raw)
In-Reply-To: <m3aaew3ip9.fsf@laptop.stevechapel.com>

On Mon, May 9, 2011 at 00:56, Steve Chapel <schapel@umich.edu> wrote:

> When editing a Python source file, the nonlocal keyword is not colorized
> as are other keywords.

It's easy to fix (see below), but "nonlocal" is a Python 3.X keyword,
and python-mode does not really support Python 3 at this point, so I
suppose that's not the only inconvenience you find when editing Python
3 code.

    Juanma



=== modified file 'lisp/progmodes/python.el'
--- lisp/progmodes/python.el	2011-04-22 18:44:26 +0000
+++ lisp/progmodes/python.el	2011-05-11 22:08:51 +0000
@@ -100,5 +100,7 @@
 	     "raise" "return" "try" "while" "with" "yield"
              ;; Not real keywords, but close enough to be fontified as such
-             "self" "True" "False")
+             "self" "True" "False"
+             ;; Python 3
+             "nonlocal")
 	 symbol-end)
     (,(rx symbol-start "None" symbol-end)	; see § Keywords in 2.7 manual





  reply	other threads:[~2011-05-11 22:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-08 22:56 bug#8639: 23.2; emacs python mode should colorize nonlocal keyword Steve Chapel
2011-05-11 22:13 ` Juanma Barranquero [this message]
2011-05-13 12:29   ` Steve Chapel
2011-05-13 12:45     ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTin-8Uy7XDGbx1cjiRGZGV-A6JbUqg@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=8639@debbugs.gnu.org \
    --cc=schapel@umich.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).