emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/spell-fu f6c849f860 30/86: Fix disabling spell-fu when use


From: ELPA Syncer
Subject: [nongnu] elpa/spell-fu f6c849f860 30/86: Fix disabling spell-fu when used without a timer
Date: Thu, 7 Jul 2022 12:03:40 -0400 (EDT)

branch: elpa/spell-fu
commit f6c849f8604b32e752ec0ea7d5aa90fdbc912a17
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>

    Fix disabling spell-fu when used without a timer
    
    Also fix for timers not being removed when disabled with a timer.
---
 spell-fu.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/spell-fu.el b/spell-fu.el
index 73e2925438..ae8553444e 100644
--- a/spell-fu.el
+++ b/spell-fu.el
@@ -557,8 +557,8 @@ Argument FACES-EXCLUDE faces to check POS excludes or 
ignored when nil."
 
 (defun spell-fu--immediate-disable ()
   "Disable immediate spell checking."
-  (spell-fu--remove-overlays)
-  (jit-lock-unregister #'spell-fu--font-lock-fontify-region))
+  (jit-lock-unregister #'spell-fu--font-lock-fontify-region)
+  (spell-fu--remove-overlays))
 
 
 ;; ---------------------------------------------------------------------------
@@ -655,6 +655,7 @@ range POINT-START to POINT-END. Otherwise remove all 
overlays."
 (defun spell-fu--idle-disable ()
   "Disable the idle style of updating."
   (jit-lock-unregister #'spell-fu--idle-font-lock-region-pending)
+  (spell-fu--remove-overlays)
   (spell-fu--idle-timer-disable)
   (spell-fu--idle-remove-overlays))
 
@@ -689,7 +690,7 @@ range POINT-START to POINT-END. Otherwise remove all 
overlays."
   "Turn off option `spell-fu-mode' for the current buffer."
   (cond
     ((<= spell-fu-idle-delay 0.0)
-      (spell-fu--immediate-enable))
+      (spell-fu--immediate-disable))
     (t
       (spell-fu--idle-disable))))
 



reply via email to

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