From 45fcb8ae271a4d01ca59a4181431d94ace7b12dc Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 6 Nov 2016 13:28:02 +0100 Subject: Emacs: Configure ispell checker dynamically --- tag-emacs/emacs.d/init.org | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'tag-emacs') 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 (("" . ispell-word)) - :config (progn - (setq ispell-program-name "aspell" - ispell-dictionary "british"))) + (use-package ispell + :bind (("" . 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 -- cgit 1.4.1