summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-05-19 12:39:43 -0500
committerCase Duckworth2021-05-19 12:39:43 -0500
commit14f6bc67ffcfb06ad4970647e660bfa05645c311 (patch)
tree78eac94cef761f1a5e7c6f6d4af8a23c7f8ca9fb
parentSetup winum keys after frame is setup (diff)
downloademacs-14f6bc67ffcfb06ad4970647e660bfa05645c311.tar.gz
emacs-14f6bc67ffcfb06ad4970647e660bfa05645c311.zip
Start flyspell automatically at home
Free up the C-z s key for shell
-rw-r--r--init.el9
1 files 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 @@
307 (unless (file-exists-p ispell-personal-dictionary) 307 (unless (file-exists-p ispell-personal-dictionary)
308 (write-region "" nil ispell-personal-dictionary nil 0)) 308 (write-region "" nil ispell-personal-dictionary nil 0))
309 309
310 (defun flyspell-start () 310 (defun flyspell-start (&optional dont-warn-when-unknown-mode)
311 "Start `flyspell-mode' or `flyspell-prog-mode', depending on current mode." 311 "Start `flyspell-mode' or `flyspell-prog-mode', depending on current mode."
312 (interactive) 312 (interactive)
313 (cond ((derived-mode-p 'text-mode) 313 (cond ((derived-mode-p 'text-mode)
314 (flyspell-mode)) 314 (flyspell-mode))
315 ((derived-mode-p 'prog-mode) 315 ((derived-mode-p 'prog-mode)
316 (flyspell-prog-mode)) 316 (flyspell-prog-mode))
317 (t (message "Non-text or -prog mode. Run `flyspell-mode'.")))) 317 ((not dont-warn-when-unknown-mode) ; god this is ugly
318 (:leader "s" flyspell-start) 318 (message "Non-text or -prog mode. Run `flyspell-mode'."))))
319
320 (when (acdw/system :home)
321 (flyspell-start t))
319 322
320 (:when-loaded 323 (:when-loaded
321 (setup (:straight flyspell-correct) 324 (setup (:straight flyspell-correct)