From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Per =?UTF-8?Q?Starb=C3=A4ck?= Newsgroups: gmane.emacs.bugs Subject: bug#43298: 27.1; Do font locking for Python 3, not 2 Date: Wed, 09 Sep 2020 20:36:17 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12253"; mail-complaints-to="usenet@ciao.gmane.io" To: 43298@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 09 23:09:16 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kG7L9-00034X-CZ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 09 Sep 2020 23:09:15 +0200 Original-Received: from localhost ([::1]:39480 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kG7L7-000653-SH for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 09 Sep 2020 17:09:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kG7Kw-0005xT-Ht for bug-gnu-emacs@gnu.org; Wed, 09 Sep 2020 17:09:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51622) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kG7Kw-000143-8F for bug-gnu-emacs@gnu.org; Wed, 09 Sep 2020 17:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kG7Kw-0008UH-34 for bug-gnu-emacs@gnu.org; Wed, 09 Sep 2020 17:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Per =?UTF-8?Q?Starb=C3=A4ck?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Sep 2020 21:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43298 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.159968572732603 (code B ref -1); Wed, 09 Sep 2020 21:09:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Sep 2020 21:08:47 +0000 Original-Received: from localhost ([127.0.0.1]:34935 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kG7Kg-0008Tl-Mn for submit@debbugs.gnu.org; Wed, 09 Sep 2020 17:08:47 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:34964) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kG4xH-0004ft-2Y for submit@debbugs.gnu.org; Wed, 09 Sep 2020 14:36:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kG4xG-0003cg-Rv for bug-gnu-emacs@gnu.org; Wed, 09 Sep 2020 14:36:26 -0400 Original-Received: from dl.lingfil.uu.se ([130.238.78.148]:43372 helo=numerus.lingfil.uu.se) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kG4xE-0006dt-9J for bug-gnu-emacs@gnu.org; Wed, 09 Sep 2020 14:36:26 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by numerus.lingfil.uu.se (Postfix) with ESMTP id D124EA1E6002; Wed, 9 Sep 2020 20:36:18 +0200 (CEST) X-Virus-Scanned: amavisd-new at lingfil.uu.se Original-Received: from numerus.lingfil.uu.se ([127.0.0.1]) by localhost (numerus.lingfil.uu.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aac0hZK0VDvA; Wed, 9 Sep 2020 20:36:17 +0200 (CEST) Original-Received: from numerus.lingfil.uu.se (localhost [127.0.0.1]) by numerus.lingfil.uu.se (Postfix) with ESMTP id A317DA1E6001; Wed, 9 Sep 2020 20:36:17 +0200 (CEST) Original-Received: (from starback@localhost) by numerus.lingfil.uu.se (8.14.7/8.14.7/Submit) id 089IaHU1014462; Wed, 9 Sep 2020 20:36:17 +0200 Received-SPF: none client-ip=130.238.78.148; envelope-from=starback@stp.lingfil.uu.se; helo=numerus.lingfil.uu.se X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/09 14:36:19 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 09 Sep 2020 17:08:45 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:187704 Archived-At: 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.