mirror of
https://github.com/abo-abo/avy.git
synced 2025-10-13 21:33:05 +00:00
Add avy-action-ispell to avy.el
The point should return to its starting location after the desired word is corrected. As is the case for the other avy-action-{something} functions, this function is also added to the avy-dispatch-alist. Fixes #142
This commit is contained in:
parent
a80f95c015
commit
c0db3642d6
11
avy.el
11
avy.el
@ -523,6 +523,17 @@ Set `avy-style' according to COMMMAND as well."
|
|||||||
(just-one-space))
|
(just-one-space))
|
||||||
(message "Killed: %s" (current-kill 0)))
|
(message "Killed: %s" (current-kill 0)))
|
||||||
|
|
||||||
|
(defun avy-action-ispell (pt)
|
||||||
|
"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))))))
|
||||||
|
|
||||||
(defun avy--process (candidates overlay-fn)
|
(defun avy--process (candidates overlay-fn)
|
||||||
"Select one of CANDIDATES using `avy-read'.
|
"Select one of CANDIDATES using `avy-read'.
|
||||||
Use OVERLAY-FN to visualize the decision overlay."
|
Use OVERLAY-FN to visualize the decision overlay."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user