From 14f6bc67ffcfb06ad4970647e660bfa05645c311 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 19 May 2021 12:39:43 -0500 Subject: Start flyspell automatically at home Free up the C-z s key for shell --- init.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/init.el b/init.el index 31413a4..09a864f 100644 --- a/init.el +++ b/init.el @@ -307,15 +307,18 @@ (unless (file-exists-p ispell-personal-dictionary) (write-region "" nil ispell-personal-dictionary nil 0)) - (defun flyspell-start () + (defun flyspell-start (&optional dont-warn-when-unknown-mode) "Start `flyspell-mode' or `flyspell-prog-mode', depending on current mode." (interactive) (cond ((derived-mode-p 'text-mode) (flyspell-mode)) ((derived-mode-p 'prog-mode) (flyspell-prog-mode)) - (t (message "Non-text or -prog mode. Run `flyspell-mode'.")))) - (:leader "s" flyspell-start) + ((not dont-warn-when-unknown-mode) ; god this is ugly + (message "Non-text or -prog mode. Run `flyspell-mode'.")))) + + (when (acdw/system :home) + (flyspell-start t)) (:when-loaded (setup (:straight flyspell-correct) -- cgit 1.4.1-21-gabe81