summary refs log tree commit diff stats
path: root/tag-emacs
diff options
context:
space:
mode:
Diffstat (limited to 'tag-emacs')
-rw-r--r--tag-emacs/emacs.d/init.org16
1 files changed, 11 insertions, 5 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org
index 4a50fa9e..a01fa1fa 100644
--- a/tag-emacs/emacs.d/init.org
+++ b/tag-emacs/emacs.d/init.org
@@ -1956,11 +1956,17 @@ I derived a mode for twig, in order to use its =mode-hook=.
 * Spelling
 
 #+BEGIN_SRC emacs-lisp
-(use-package ispell
-  :bind (("<f8>" . ispell-word))
-  :config (progn
-            (setq ispell-program-name "aspell"
-                  ispell-dictionary "british")))
+  (use-package ispell
+    :bind (("<f8>" . ispell-word))
+    :config (progn
+              (cond
+               ((executable-find "aspell") (setq ispell-program-name "aspell"
+                                                 ispell-dictionary "british"
+                                                 ispell-really-aspell t
+                                                 ispell-really-hunspell nil))
+               ((executable-find "hunspell") (setq ispell-program-name "hunspell"
+                                                   ispell-really-aspell nil
+                                                   ispell-really-hunspell t)))))
 #+END_SRC
 
 * Scripting