about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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)