diff --git a/avy.el b/avy.el index 20edd7b..3b8f37d 100644 --- a/avy.el +++ b/avy.el @@ -523,6 +523,17 @@ Set `avy-style' according to COMMMAND as well." (just-one-space)) (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) "Select one of CANDIDATES using `avy-read'. Use OVERLAY-FN to visualize the decision overlay."