bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Eli Zaretskii
Subject: bug#54131: 29.0.50; Flyspell incorrectly reports first word in Python f-string
Date: Thu, 24 Feb 2022 08:27:49 +0200

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Wed, 23 Feb 2022 21:13:27 +0100
> Cc: 54131@debbugs.gnu.org
> 
> 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).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]