summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/+flyspell-correct.el15
1 files changed, 12 insertions, 3 deletions
diff --git a/lisp/+flyspell-correct.el b/lisp/+flyspell-correct.el index 473b054..b995b7e 100644 --- a/lisp/+flyspell-correct.el +++ b/lisp/+flyspell-correct.el
@@ -2,11 +2,20 @@
2 2
3;;; Code: 3;;; Code:
4 4
5(defun +flyspell-correct-buffer (&rest _) ; Enables this to be run as a hook 5(defun +flyspell-correct-buffer (&optional prefix)
6 "Run `flyspell-correct-wrapper' on all misspelled words in the buffer." 6 "Run `flyspell-correct-wrapper' on all misspelled words in the buffer.
7 (interactive) 7With PREFIX, prompt to change the current dictionary."
8 (interactive "P")
9 (when prefix
10 (let ((current-prefix-arg nil))
11 (call-interactively #'ispell-change-dictionary)))
8 (+with-message "Checking spelling" 12 (+with-message "Checking spelling"
9 (flyspell-correct-move (point-min) :forward :rapid))) 13 (flyspell-correct-move (point-min) :forward :rapid)))
10 14
15(defun +flyspell-correct-buffer-h (&rest _)
16 "Run `+flyspell-correct-buffer'.
17This is suitable for placement in a hook."
18 (+flyspell-correct-buffer))
19
11(provide '+flyspell-correct) 20(provide '+flyspell-correct)
12;;; +flyspell-correct.el ends here 21;;; +flyspell-correct.el ends here