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

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

[elpa] master 20ecb9b 024/110: Use flyspell if its minor mode is active


From: Oleh Krehel
Subject: [elpa] master 20ecb9b 024/110: Use flyspell if its minor mode is active
Date: Sat, 11 May 2019 10:15:36 -0400 (EDT)

branch: master
commit 20ecb9bed63abcef28e1f36c72515380306c49c3
Author: MadAnd <address@hidden>
Commit: Oleh Krehel <address@hidden>

    Use flyspell if its minor mode is active
    
    Fixes #160
    Fixes #161
---
 avy.el | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/avy.el b/avy.el
index e076e1c..28700f1 100644
--- a/avy.el
+++ b/avy.el
@@ -540,12 +540,14 @@ Set `avy-style' according to COMMMAND as well."
   "Auto correct word at PT."
   (save-excursion
     (goto-char pt)
-    (if (looking-at-p "\\b")
-        (ispell-word)
-      (progn
-        (backward-word)
-        (when (looking-at-p "\\b")
-          (ispell-word))))))
+    (if (bound-and-true-p flyspell-mode)
+        (flyspell-correct-word-before-point)
+      (if (looking-at-p "\\b")
+          (ispell-word)
+        (progn
+          (backward-word)
+          (when (looking-at-p "\\b")
+            (ispell-word)))))))
 
 (defun avy--process (candidates overlay-fn)
   "Select one of CANDIDATES using `avy-read'.



reply via email to

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