From 81152ca24289d2b08fcfe64b19164894c048524e Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 6 Jan 2022 15:46:50 -0600 Subject: Add +flyspell-correct-buffer --- init.el | 4 +++- lisp/+flyspell-correct.el | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 lisp/+flyspell-correct.el diff --git a/init.el b/init.el index 07679e7..67528fd 100644 --- a/init.el +++ b/init.el @@ -948,9 +948,11 @@ See also `crux-reopen-as-root-mode'." (:+key "M-q" #'filldent-dwim)) (setup (:straight flyspell-correct) + (:+also-load +flyspell-correct ) (:option flyspell-correct--cr-key ";") (:bind-into flyspell - "C-;" #'flyspell-correct-wrapper)) + "C-;" #'flyspell-correct-wrapper + "" #'+flyspell-correct-buffer)) (setup (:straight-when (forge :host github :repo "magit/forge") diff --git a/lisp/+flyspell-correct.el b/lisp/+flyspell-correct.el new file mode 100644 index 0000000..473b054 --- /dev/null +++ b/lisp/+flyspell-correct.el @@ -0,0 +1,12 @@ +;;; +flyspell-correct.el --- -*- lexical-binding: t; -*- + +;;; Code: + +(defun +flyspell-correct-buffer (&rest _) ; Enables this to be run as a hook + "Run `flyspell-correct-wrapper' on all misspelled words in the buffer." + (interactive) + (+with-message "Checking spelling" + (flyspell-correct-move (point-min) :forward :rapid))) + +(provide '+flyspell-correct) +;;; +flyspell-correct.el ends here -- cgit 1.4.1-21-gabe81