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

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

bug#39898: 28.0.50; The off-by-one bug in `flyspell-check-previous-highl


From: OGAWA Hirofumi
Subject: bug#39898: 28.0.50; The off-by-one bug in `flyspell-check-previous-highlighted-word'
Date: Fri, 28 Aug 2020 16:02:59 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Stefan Kangas <stefan@marxist.se>
>> Date: Thu, 27 Aug 2020 12:37:45 -0700
>> Cc: 39898@debbugs.gnu.org
>> 
>> Indeed, this just looks like an OBOE to me.
>
> Does it?  The doc string of flyspell-check-previous-highlighted-word
> says:
>
>   Correct the closest previous word that is highlighted as misspelled.
>   This function scans for a word which starts before point that has been
>                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   highlighted by Flyspell as misspelled.
>
> The test case, AFAIU, creates a situation where the misspelled word
> starts _after_ point (remember that point is a place between 2
> characters, and its value is the character following point).  So I
> don't see a bug here.  Am I missing something?

(with-temp-buffer
  (select-window (display-buffer (current-buffer)))
  (insert "appl")
  (insert "   ")
  (flyspell-buffer)
  (flyspell-check-previous-highlighted-word))

Then, this point is before, and should work? This also calls
(error "No word...").

Thanks.
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>





reply via email to

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