]> git.eshelyaron.com Git - emacs.git/commit
Make it configurable to highlight Python 2 builtins
authorkobarity <kobarity@gmail.com>
Tue, 4 Feb 2025 15:02:05 +0000 (00:02 +0900)
committerEshel Yaron <me@eshelyaron.com>
Sun, 9 Feb 2025 08:35:43 +0000 (09:35 +0100)
commitc0db7440247c5bff9564b440887aa6eebac25d4c
tree1ab998bec3c7fb429795089f2ac6f852f20668a4
parent0a37678d8df813661604f633b02d65e45370ef3f
Make it configurable to highlight Python 2 builtins

By default, Python 2-only builtins are not highlighted.

* lisp/progmodes/python.el (python-2-support): New defcustom.
(python-font-lock-builtin-types)
(python-font-lock-builtins-python3)
(python-font-lock-builtins-python2)
(python-font-lock-builtins)
(python-font-lock-special-attributes)
(python-font-lock-builtin-exceptions-python3)
(python-font-lock-builtin-exceptions-python2)
(python-font-lock-builtin-exceptions): New variables.
(python-font-lock-keywords-level-2)
(python-font-lock-keywords-maximum-decoration)
(python--treesit-builtin-types)
(python--treesit-builtins)
(python--treesit-special-attributes)
(python--treesit-exceptions): Use new variables.

Co-authored-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Co-authored-by: Stefan Kangas <stefankangas@gmail.com>
(cherry picked from commit 999d054dc1e265f1a39c10035a3a3f7f75de8445)
lisp/progmodes/python.el