Function: ispell-hunspell-add-multi-dic

ispell-hunspell-add-multi-dic is an interactive and byte-compiled function defined in ispell.el.gz.

Signature

(ispell-hunspell-add-multi-dic DICT)

Documentation

Add DICT of the form "DICT1,DICT2,..." to ispell-dictionary-alist.

Invoke this command before you want to start Hunspell for the first time with a particular combination of dictionaries. The first dictionary in the list must have an affix file where Hunspell affix files are kept.

If you invoke this from Lisp, make sure to precede it with a call to ispell-set-spellchecker-params, as ispell-change-dictionary calls it only when invoked interactively.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/ispell.el.gz
(defun ispell-hunspell-add-multi-dic (dict)
  "Add DICT of the form \"DICT1,DICT2,...\" to `ispell-dictionary-alist'.

Invoke this command before you want to start Hunspell for the first time
with a particular combination of dictionaries.  The first dictionary
in the list must have an affix file where Hunspell affix files are kept.

If you invoke this from Lisp, make sure to precede it with
a call to `ispell-set-spellchecker-params', as `ispell-change-dictionary'
calls it only when invoked interactively."
  (interactive "sMulti-dictionary combination: ")
  ;; Make sure the first dictionary in the list is known to us.
  (let ((first-dict (car (split-string dict "," t))))
    (unless ispell-hunspell-dictionary-alist
      (ispell-find-hunspell-dictionaries)
      (setq ispell-dictionary-alist ispell-hunspell-dictionary-alist))
    (or (assoc first-dict ispell-local-dictionary-alist)
        (assoc first-dict ispell-dictionary-alist)
        (error "Unknown dictionary: %s" first-dict)))
  (cl-pushnew (list dict '()) ispell-dictionary-alist :test #'equal)
  (ispell-hunspell-fill-dictionary-entry dict))