all repos — nixfiles @ 45fcb8ae271a4d01ca59a4181431d94ace7b12dc

System and user configuration, managed by nix and home-manager

Emacs: Configure ispell checker dynamically

Alan Pearce
commit

45fcb8ae271a4d01ca59a4181431d94ace7b12dc

parent

d18942af3be0ee634695630e2e0b17a3f12fd815

1 file changed, 11 insertions(+), 5 deletions(-)

jump to
M tag-emacs/emacs.d/init.orgtag-emacs/emacs.d/init.org
@@ -1956,11 +1956,17 @@
* 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