Skip to content

Commit

Permalink
tweak(spell-fu): move dict registration macro to the obsolete module
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Dec 28, 2023
1 parent c903c17 commit 116aa8e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 27 deletions.
26 changes: 0 additions & 26 deletions modules/extras/me-spell-fu.el

This file was deleted.

9 changes: 8 additions & 1 deletion modules/obsolete/me-spell-fu.el
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@
:init
(+map! "ts" #'spell-fu-mode)
(+nvmap! "z=" #'+spell-fu-correct) ; autoloaded from `me-spell-fu'

(defmacro +spell-fu-register-dictionaries! (&rest langs)
"Register dictionaries for `LANGS` to spell-fu's multi-dict."
(with-eval-after-load 'spell-fu
(let* ((fn-name (intern (format "+spell-fu--multi-langs-%s-h" (string-join langs "-"))))
(closure `(defun ,fn-name ())))
(dolist (lang langs)
(setq closure (append closure `((+spell-fu--add-dictionary ,lang)))))
(append '(add-hook (quote spell-fu-mode-hook)) (list closure)))))
(defcustom +spell-excluded-faces-alist
'((markdown-mode
. (markdown-code-face markdown-html-attr-name-face markdown-html-attr-value-face
Expand Down

0 comments on commit 116aa8e

Please sign in to comment.