about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--init.el8
1 files changed, 3 insertions, 5 deletions
diff --git a/init.el b/init.el index 8d18dd9..359c188 100644 --- a/init.el +++ b/init.el
@@ -390,20 +390,18 @@
390 (unless (file-exists-p ispell-personal-dictionary) 390 (unless (file-exists-p ispell-personal-dictionary)
391 (write-region "" nil ispell-personal-dictionary nil 0)) 391 (write-region "" nil ispell-personal-dictionary nil 0))
392 392
393 (defun flyspell-start (&optional dont-warn-when-unknown-mode) 393 (defun flyspell-start ()
394 "Start `flyspell-mode' or `flyspell-prog-mode', depending on current mode." 394 "Start `flyspell-mode' or `flyspell-prog-mode', depending on current mode."
395 (interactive) 395 (interactive)
396 (cond ((derived-mode-p 'text-mode) 396 (cond ((derived-mode-p 'text-mode)
397 (flyspell-mode)) 397 (flyspell-mode))
398 ((derived-mode-p 'prog-mode) 398 ((derived-mode-p 'prog-mode)
399 (flyspell-prog-mode)) 399 (flyspell-prog-mode))
400 ((not dont-warn-when-unknown-mode) ; god this is ugly 400 ((called-interactively-p)
401 (message "Non-text or -prog mode. Run `flyspell-mode'.")))) 401 (message "Non-text or -prog mode. Run `flyspell-mode'."))))
402 402
403 (:global "C-c s" flyspell-start)
404
405 (when (acdw/system :home) 403 (when (acdw/system :home)
406 (flyspell-start t)) 404 (add-hook 'change-major-mode-hook #'flyspell-start))
407 405
408 (:when-loaded 406 (:when-loaded
409 (setup (:straight flyspell-correct) 407 (setup (:straight flyspell-correct)