From e5c025158ef6e383aa892ef88e63a2a32de3d7fb Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 18 Oct 2022 12:08:21 -0500 Subject: Add a bunch of other stuff or whatever --- lisp/+flyspell-correct.el | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 lisp/+flyspell-correct.el (limited to 'lisp/+flyspell-correct.el') diff --git a/lisp/+flyspell-correct.el b/lisp/+flyspell-correct.el new file mode 100644 index 0000000..f4fc956 --- /dev/null +++ b/lisp/+flyspell-correct.el @@ -0,0 +1,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 -- cgit 1.4.1-21-gabe81