diff options
| author | Hong Xu | 2019-11-22 14:34:59 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-11-22 14:34:59 +0100 |
| commit | f9b8c74af1817add9ff5b5b73da574b81d91f68a (patch) | |
| tree | dae4c3f30252772b40189bdec7749beb7fd032e1 | |
| parent | f5667953f73b557b4461677df9a1a0017ff46f60 (diff) | |
| download | emacs-f9b8c74af1817add9ff5b5b73da574b81d91f68a.tar.gz emacs-f9b8c74af1817add9ff5b5b73da574b81d91f68a.zip | |
font-lock special attributes in python-mode
* lisp/progmodes/python.el (python-font-lock-keywords-level-2): Add
special attributes (bug#38318).
| -rw-r--r-- | lisp/progmodes/python.el | 10 |
1 files changed, 8 insertions, 2 deletions
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.") | |||
| 567 | "intern" | 567 | "intern" |
| 568 | ;; Python 3: | 568 | ;; Python 3: |
| 569 | "ascii" "breakpoint" "bytearray" "bytes" "exec" | 569 | "ascii" "breakpoint" "bytearray" "bytes" "exec" |
| 570 | ;; Extra: | 570 | ;; Special attributes: |
| 571 | "__all__" "__doc__" "__name__" "__package__") | 571 | ;; https://docs.python.org/3/reference/datamodel.html |
| 572 | "__annotations__" "__closure__" "__code__" | ||
| 573 | "__defaults__" "__dict__" "__doc__" "__globals__" | ||
| 574 | "__kwdefaults__" "__name__" "__module__" "__package__" | ||
| 575 | "__qualname__" | ||
| 576 | ;; Extras: | ||
| 577 | "__all__") | ||
| 572 | symbol-end) . font-lock-builtin-face)) | 578 | symbol-end) . font-lock-builtin-face)) |
| 573 | "Font lock keywords to use in python-mode for level 2 decoration. | 579 | "Font lock keywords to use in python-mode for level 2 decoration. |
| 574 | 580 | ||