blob: 9a33cc0b258a883e28126cae8bdf7a7cb0ef0fd4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
;;; +flyspell-correct.el --- -*- lexical-binding: t; -*-
;;; Code:
(require 'flyspell-correct)
(defun +flyspell-correct-buffer (&optional prefix)
"Run `flyspell-correct-wrapper' on all misspelled words in the buffer.
With PREFIX, prompt to change the current dictionary."
(interactive "P")
(flyspell-buffer)
(when prefix
(let ((current-prefix-arg nil))
(call-interactively #'ispell-change-dictionary)))
(with-message "Checking spelling"
(flyspell-correct-move (point-min) :forward :rapid)))
(defun +flyspell-correct-buffer-h (&rest _)
"Run `+flyspell-correct-buffer'.
This is suitable for placement in a hook."
(+flyspell-correct-buffer))
(provide '+flyspell-correct)
;;; +flyspell-correct.el ends here
|