Commit 4912af61d9c3

Vincent Demeester <vincent@sbr.pm>
2020-04-07 16:09:10
config-editing.el: update flyspell configuration
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent f743637
Changed files (1)
tools
emacs
tools/emacs/config/config-editing.el
@@ -148,31 +148,27 @@ Else toggle the comment status of the line at point."
          ("M-;" . comment-indent)
          ("C-x C-;" . comment-box)))
 
+;; UseFlySpell
 (use-package flyspell
-  :init
-  (setq flyspell-issue-message-flag nil)
-  (setq flyspell-issue-welcome-flag nil)
-  (setq ispell-program-name "hunspell")
-  (setq ispell-local-dictionary "en_GB")
-  (setq ispell-local-dictionary-alist
-        '(("en_GB"
-           "[[:alpha:]]"
-           "[^[:alpha:]]"
-           "[']"
-           nil
-           ("-d" "en_GB,fr_FR")
-           nil
-           utf-8)))
+  :commands (flyspell-prog-mode flyspell-mode)
+  :hook((text-mode . turn-on-flyspell)
+        (prog-mode . turn-on-flyspell))
   :config
   (define-key flyspell-mode-map (kbd "C-;") nil)
-  :hook
-  (text-mode . turn-on-flyspell)
-  (prog-mode . turn-off-flyspell))
-
-(use-package flyspell-correct-ivy
-  :after flyspell
-  :bind (:map flyspell-mode-map
-              ([remap flyspell-correct-word-before-point] . flyspell-correct-previous-word-generic)))
+  (setq-default flyspell-issue-message-flag nil
+                flyspell-issue-welcome-flag nil
+                ispell-program-name "hunspell"
+                ispell-local-dictionary "en_GB"
+                ispell-local-dictionary-alist
+                '(("en_GB"
+                   "[[:alpha:]]"
+                   "[^[:alpha:]]"
+                   "[']"
+                   nil
+                   ("-d" "en_GB,fr_FR")
+                   nil
+                   utf-8))))
+;; -UseFlySpell
 
 (use-package emacs
   :init