mirror of
https://github.com/abo-abo/avy.git
synced 2025-10-15 22:13:04 +00:00
parent
0e59474430
commit
8686845ed9
7
avy.el
7
avy.el
@ -748,6 +748,11 @@ Set `avy-style' according to COMMMAND as well."
|
|||||||
|
|
||||||
(declare-function flyspell-correct-word-before-point "flyspell")
|
(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)
|
(defun avy-action-ispell (pt)
|
||||||
"Auto correct word at PT."
|
"Auto correct word at PT."
|
||||||
(save-excursion
|
(save-excursion
|
||||||
@ -758,7 +763,7 @@ Set `avy-style' according to COMMMAND as well."
|
|||||||
(line-beginning-position)
|
(line-beginning-position)
|
||||||
(line-end-position)))
|
(line-end-position)))
|
||||||
((bound-and-true-p flyspell-mode)
|
((bound-and-true-p flyspell-mode)
|
||||||
(flyspell-correct-word-before-point))
|
(funcall avy-flyspell-correct-function))
|
||||||
((looking-at-p "\\b")
|
((looking-at-p "\\b")
|
||||||
(ispell-word))
|
(ispell-word))
|
||||||
(t
|
(t
|
||||||
|
Loading…
x
Reference in New Issue
Block a user