From: "Per Starbäck" <starback@cl.lingfil.uu.se>
To: 43298@debbugs.gnu.org
Subject: bug#43298: 27.1; Do font locking for Python 3, not 2
Date: Wed, 09 Sep 2020 20:36:17 +0200 [thread overview]
Message-ID: <sa5wo12ol0e.fsf@numerus.lingfil.uu.se> (raw)
In GNU Emacs 27.1:
$ emacs -Q -f /tmp/new.py
for RET print RET len RET
"print" gets the same colour as "for", that is as a keyword.
I think it should get the same as "len", that is as a builtin
function.
Python.el has a section
;; Python 2:
"print" "exec"
because in Python 2 these two were keywords. But in Python 3 they are built-in
functions.
I think it's overkill to try to determine if the buffer contains Python 2 or 3
and highlight them differently. Using the same fontlocking is good enough,
since it's not a big problem to get these in the wrong colour.
But now when Python 2 is officially discontinued I think it's time to
let it follow Python 3 and get the small inconvenience when editing old
code and not when editing current code.
next reply other threads:[~2020-09-09 18:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-09 18:36 Per Starbäck [this message]
2020-09-10 17:23 ` bug#43298: 27.1; Do font locking for Python 3, not 2 Kévin Le Gouguec
2021-10-11 13:25 ` Stefan Kangas
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=sa5wo12ol0e.fsf@numerus.lingfil.uu.se \
--to=starback@cl.lingfil.uu.se \
--cc=43298@debbugs.gnu.org \
/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).