]> git.eshelyaron.com Git - emacs.git/commitdiff
font-lock special attributes in python-mode
authorHong Xu <hong@topbug.net>
Fri, 22 Nov 2019 13:34:59 +0000 (14:34 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 22 Nov 2019 13:34:59 +0000 (14:34 +0100)
* lisp/progmodes/python.el (python-font-lock-keywords-level-2): Add
special attributes (bug#38318).

lisp/progmodes/python.el

index 37e0ccf719877b56e395495131cc254964547a62..e720c6eb6a860d209c359d02be65707c98b81fd3 100644 (file)
@@ -567,8 +567,14 @@ class declarations.")
            "intern"
            ;; Python 3:
            "ascii" "breakpoint" "bytearray" "bytes" "exec"
-           ;; 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__")
           symbol-end) . font-lock-builtin-face))
   "Font lock keywords to use in python-mode for level 2 decoration.