2022-01-06 21:46:50 +00:00
|
|
|
;;; +flyspell-correct.el --- -*- lexical-binding: t; -*-
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
2022-06-08 22:59:53 +00:00
|
|
|
(require 'flyspell-correct)
|
|
|
|
|
2022-02-17 05:18:28 +00:00
|
|
|
(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")
|
2022-06-08 22:59:53 +00:00
|
|
|
(flyspell-buffer)
|
2022-02-17 05:18:28 +00:00
|
|
|
(when prefix
|
|
|
|
(let ((current-prefix-arg nil))
|
|
|
|
(call-interactively #'ispell-change-dictionary)))
|
2022-01-06 21:46:50 +00:00
|
|
|
(+with-message "Checking spelling"
|
|
|
|
(flyspell-correct-move (point-min) :forward :rapid)))
|
|
|
|
|
2022-02-17 05:18:28 +00:00
|
|
|
(defun +flyspell-correct-buffer-h (&rest _)
|
|
|
|
"Run `+flyspell-correct-buffer'.
|
|
|
|
This is suitable for placement in a hook."
|
|
|
|
(+flyspell-correct-buffer))
|
|
|
|
|
2022-01-06 21:46:50 +00:00
|
|
|
(provide '+flyspell-correct)
|
|
|
|
;;; +flyspell-correct.el ends here
|