GNU bug report logs - #38318
[PATCH] Highlight Python special attributes.

Previous Next

Package: emacs;

Reported by: Hong Xu <hong <at> topbug.net>

Date: Fri, 22 Nov 2019 00:30:02 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Hong Xu <hong <at> topbug.net>
Cc: 38318 <at> debbugs.gnu.org
Subject: bug#38318: [PATCH] Highlight Python special attributes.
Date: Fri, 22 Nov 2019 14:35:47 +0100
Hong Xu <hong <at> topbug.net> writes:

> * lisp/progmodes/python.el (python-font-lock-keywords-level-2): Add
> special attributes

[...]

> -           ;; Extra:
> -           "__all__" "__doc__" "__name__" "__package__")
> +           ;; Special attributes:
> +           ;; https://docs.python.org/3/reference/datamodel.html
> +           "__annotations__" "__closure__" "__code__"
> +           "__defaults__" "__dict__" "__doc__" "__globals__"
> +           "__kwdefaults__" "__name__" "__module__" "__package__"
> +           "__qualname__"
> +           ;; Extras:
> +           "__all__")

I'm no (ahem) Python expert, but this makes sense to me, so I've applied
the patch to Emacs 27.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 5 years and 179 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.