unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Christopher Dimech <dimech@gmx.com>
Cc: 45622@debbugs.gnu.org
Subject: bug#45622: (flyspell-buffer) does not enable spelling highlighting
Date: Mon, 04 Jan 2021 16:54:09 +0200	[thread overview]
Message-ID: <834kjwda7i.fsf@gnu.org> (raw)
In-Reply-To: <trinity-fa731ade-f80a-4f36-95f3-d2c6c3876b8e-1609693096020@3c-app-mailcom-bs05> (message from Christopher Dimech on Sun, 3 Jan 2021 17:58:16 +0100)

> From: Christopher Dimech <dimech@gmx.com>
> Cc: 45622@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






  reply	other threads:[~2021-01-04 14:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-03 13:55 bug#45622: (flyspell-buffer) does not enable spelling highlighting Christopher Dimech
2021-01-03 15:32 ` Eli Zaretskii
2021-01-03 16:58   ` Christopher Dimech
2021-01-04 14:54     ` Eli Zaretskii [this message]
2021-02-09  8:37       ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=834kjwda7i.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=45622@debbugs.gnu.org \
    --cc=dimech@gmx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).