From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#45622: (flyspell-buffer) does not enable spelling highlighting Date: Mon, 04 Jan 2021 16:54:09 +0200 Message-ID: <834kjwda7i.fsf@gnu.org> References: <83im8ec9ym.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17150"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 45622@debbugs.gnu.org To: Christopher Dimech Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 04 15:55:09 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kwRGH-0004Is-O9 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Jan 2021 15:55:09 +0100 Original-Received: from localhost ([::1]:37438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwRGG-0001Kz-Pk for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Jan 2021 09:55:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwRGA-0001Kr-OZ for bug-gnu-emacs@gnu.org; Mon, 04 Jan 2021 09:55:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46793) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kwRGA-0008F5-H1 for bug-gnu-emacs@gnu.org; Mon, 04 Jan 2021 09:55:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kwRGA-0008Dd-Cg for bug-gnu-emacs@gnu.org; Mon, 04 Jan 2021 09:55:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Jan 2021 14:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45622 X-GNU-PR-Package: emacs Original-Received: via spool by 45622-submit@debbugs.gnu.org id=B45622.160977206831541 (code B ref 45622); Mon, 04 Jan 2021 14:55:02 +0000 Original-Received: (at 45622) by debbugs.gnu.org; 4 Jan 2021 14:54:28 +0000 Original-Received: from localhost ([127.0.0.1]:58338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kwRFc-0008Cf-EO for submit@debbugs.gnu.org; Mon, 04 Jan 2021 09:54:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kwRFa-0008CR-MW for 45622@debbugs.gnu.org; Mon, 04 Jan 2021 09:54:26 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35793) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwRFV-00081Z-3e; Mon, 04 Jan 2021 09:54:21 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1923 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kwRFS-00081s-4c; Mon, 04 Jan 2021 09:54:21 -0500 In-Reply-To: (message from Christopher Dimech on Sun, 3 Jan 2021 17:58:16 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:197308 Archived-At: > From: Christopher Dimech > 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