From: Hong Xu Date: Fri, 22 Nov 2019 13:34:59 +0000 (+0100) Subject: font-lock special attributes in python-mode X-Git-Tag: emacs-27.0.90~554 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f9b8c74af1817add9ff5b5b73da574b81d91f68a;p=emacs.git font-lock special attributes in python-mode * lisp/progmodes/python.el (python-font-lock-keywords-level-2): Add special attributes (bug#38318). --- diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 37e0ccf7198..e720c6eb6a8 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -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.