summary refs log tree commit diff stats
path: root/user/emacs
diff options
context:
space:
mode:
authorAlan Pearce2024-04-28 09:15:27 +0200
committerAlan Pearce2024-04-28 09:15:27 +0200
commitd960a2fda8b3f3e55ce9e970b158e206d7202feb (patch)
treee1e40388d870799e63db620b38488eb6c0985c67 /user/emacs
parentb3888682818dde6b44e64b043c136f2ae6d70d89 (diff)
downloadnixfiles-d960a2fda8b3f3e55ce9e970b158e206d7202feb.tar.lz
nixfiles-d960a2fda8b3f3e55ce9e970b158e206d7202feb.tar.zst
nixfiles-d960a2fda8b3f3e55ce9e970b158e206d7202feb.zip
emacs: disable jinx-mode if loading dictionaries failed
Diffstat (limited to 'user/emacs')
-rw-r--r--user/emacs/init.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index 5282a0a4..c7b995fa 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -1028,7 +1028,11 @@ _C-k_: prev  _u_pper              _=_: upper/lower       _s_mart resolve
             conf-mode-hook))
   :general ([remap ispell-word] #'jinx-correct-word
             [remap evil-prev-flyspell-error] #'jinx-previous
-            [remap evil-next-flyspell-error] #'jinx-next))
+            [remap evil-next-flyspell-error] #'jinx-next)
+  :config (progn
+            (advice-add 'jinx--load-dicts :after (lambda ()
+                                                   (unless jinx--dicts
+                                                     (global-jinx-mode -1))))))
 
 (use-package feature-mode
   :defer t