GNU bug report logs - #45622
(flyspell-buffer) does not enable spelling highlighting

Previous Next

Package: emacs;

Reported by: Christopher Dimech <dimech <at> gmx.com>

Date: Sun, 3 Jan 2021 13:56:02 UTC

Severity: normal

Tags: moreinfo

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Christopher Dimech <dimech <at> gmx.com>
Cc: 45622 <at> debbugs.gnu.org
Subject: bug#45622: (flyspell-buffer) does not enable spelling highlighting
Date: Mon, 04 Jan 2021 16:54:09 +0200
> From: Christopher Dimech <dimech <at> gmx.com>
> Cc: 45622 <at> debbugs.gnu.org
> Date: Sun, 3 Jan 2021 17:58:16 +0100
> 
> The problem occurs with the following code.  If you comment out
> (flyspell-prog-mode) the wavy underline gets activated.  But not
> if you include  (flyspell-prog-mode).
> 
> (defvar flyspell-buffer-state nil)
> (defun flyspell-buffer-gungadin ()
>   "Corrects vocabulary by inspecting the spelling of text in a buffer."
>   (interactive)
> 
>   (pcase flyspell-buffer-state
>     (1 (message "%s" "Flyspell: Buffer")
>        (flyspell-buffer)
>        (setq flyspell-buffer-state 2))
> 
>     (2 (message "%s" "Flyspell: Off")
>        (flyspell-mode 0)
>        (setq flyspell-buffer-state 0))
> 
>     (_ (message "%s" "Flyspell: prog-mode")
>        (flyspell-prog-mode)
>        (setq flyspell-buffer-state 1))) )
> 
> (global-set-key (kbd "H-9") 'flyspell-buffer-gungadin)

I cannot reproduce with this, either.  Some steps are still missing,
though, so maybe there's something else you do to trigger the problem.

Here's what I did:

  . emacs -Q

  . Intentionally edit the comment at the top of *scratch* to make 2
    spelling mistakes in it.
  . Insert and evaluate the code you posted
  . Move point to beginning of buffer
  . Press the key you bind to this command once -- this activates the
    flyspell-prog-mode
  . Press the key the second time -- this runs flyspell-buffer and
    highlights the 2 typos I made





This bug report was last modified 4 years and 105 days ago.

Previous Next


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