diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 9849fde8588..02588d756e9 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1187,13 +1187,15 @@ fontified." :feature 'builtin :language 'python - `(((identifier) @font-lock-builtin-face - (:match ,(rx-to-string - `(seq bol - (or ,@python--treesit-builtins - ,@python--treesit-special-attributes) - eol)) - @font-lock-builtin-face))) + `((call function: (identifier) @font-lock-builtin-face + (:match ,(rx-to-string + `(seq bol (or ,@python--treesit-builtins) eol)) + @font-lock-builtin-face)) + (attribute attribute: (identifier) @font-lock-builtin-face + (:match ,(rx-to-string + `(seq bol + (or ,@python--treesit-special-attributes) eol)) + @font-lock-builtin-face))) :feature 'decorator :language 'python