From 434e105886f07af9d5b2f7366679a8370a23538d Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 16 Feb 2022 23:18:28 -0600 Subject: Change,,, whatever --- lisp/+flyspell-correct.el | 15 ++++++++++++--- 1 file 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 @@ ;;; 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) +(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") + (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