GNU bug report logs - #54131
29.0.50; Flyspell incorrectly reports first word in Python f-string

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Wed, 23 Feb 2022 18:17:02 UTC

Severity: normal

Found in version 29.0.50

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: p.stephani2 <at> gmail.com, 54131 <at> debbugs.gnu.org
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 <at> gnus.org>
> Date: Wed, 23 Feb 2022 21:13:27 +0100
> Cc: 54131 <at> 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).




This bug report was last modified 3 years and 112 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.