Subject: bug#54131: 29.0.50; Flyspell incorrectly reports first word in Python f-string

From: Eli Zaretskii <[email-masked]>
Date: Thu, 24 Feb 2022 08:27:49 +0200

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Wed, 23 Feb 2022 21:13:27 +0100
> Cc: [email-masked]
> 
> Skimming ispell-get-word, it looks like it uses a regexp to determine
> what the word at point is, so we'd need to make some sort of framework
> to allow modes to say where a string begins and ends?  Or if we want to
> just do something hackish, we could make that function check
> the face for font-lock-string-face and then limit based on that.  (Which
> sounds simple enough.)

Our spell-checking modes aren't supposed to work on code, so they
don't pay any attention to the buffer's syntax table, and instead use
regular expressions specific to the proof-reading language to know
what can and cannot be in a word.

For program sources, flyspell-prog-mode relies on font-lock faces to
tell it where strings and comments are, so perhaps this part doesn't
work for some reason (and perhaps the root cause is in font-lock of
python-mode, not in flyspell.el per se).