Subject: bug#45679: 28.0.50; python-mode variable font locking is inconsistent

From: Doug Davis <[email-masked]>
Date: Tue, 05 Jan 2021 16:51:02 -0600

Doug Davis <[email-masked]> writes:

> In python-mode I'm seeing inconsistent variable font locking in class
> and function definitions. The first variable in a class keeps the
> default face while the remaining variables get the variable face. In
> functions it's a bit more inconsistent. If I modify the text around a
> bugged variable the face is corrected. Below is a small example which
> recreated the behavior. I see it with both my full configuration loaded
> and with emacs -Q. I can reproduce on both GNU/Linux and macOS.

Just to expand on this a bit-- the font locking appears to cycle between
the variable name face and the default face. Making changes inside of a
function is triggering some variables to rotate between the two faces. I
don't yet see an obvious pattern.