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

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

[elpa] externals/avy 8686845ed9 01/31: avy.el (avy-flyspell-correct-func


From: ELPA Syncer
Subject: [elpa] externals/avy 8686845ed9 01/31: avy.el (avy-flyspell-correct-function): Add
Date: Mon, 13 Feb 2023 21:57:24 -0500 (EST)

branch: externals/avy
commit 8686845ed907b986ac7c95169b6396300ee114c2
Author: Yanghao Xie <yhaoxie@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    avy.el (avy-flyspell-correct-function): Add
    
    Fixes #273
---
 avy.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/avy.el b/avy.el
index 25d89e94fe..0055fcb88f 100644
--- a/avy.el
+++ b/avy.el
@@ -748,6 +748,11 @@ Set `avy-style' according to COMMMAND as well."
 
 (declare-function flyspell-correct-word-before-point "flyspell")
 
+(defcustom avy-flyspell-correct-function #'flyspell-correct-word-before-point
+  "Function called to correct word by `avy-action-ispell' when
+`flyspell-mode' is enabled."
+  :type 'function)
+
 (defun avy-action-ispell (pt)
   "Auto correct word at PT."
   (save-excursion
@@ -758,7 +763,7 @@ Set `avy-style' according to COMMMAND as well."
         (line-beginning-position)
         (line-end-position)))
       ((bound-and-true-p flyspell-mode)
-       (flyspell-correct-word-before-point))
+       (funcall avy-flyspell-correct-function))
       ((looking-at-p "\\b")
        (ispell-word))
       (t



reply via email to

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