]> code.delx.au - gnu-emacs-elpa/blob - company-ispell.el
Added ispell back-end.
[gnu-emacs-elpa] / company-ispell.el
1 (require 'company)
2 (require 'ispell)
3 (eval-when-compile (require 'cl))
4
5 (defcustom company-ispell-dictionary nil
6 "*Dictionary to use for `company-ispell'.
7 If nil, use `ispell-complete-word-dict'."
8 :group 'company
9 :type '(choice (const :tag "default (nil)" nil)
10 (file :tag "dictionary" t)))
11
12 (defun company-ispell (command &optional arg &rest ignored)
13 (case command
14 ('prefix (company-grab "\\<\\w+\\>"))
15 ('candidates (lookup-words arg (or company-ispell-dictionary
16 ispell-complete-word-dict)))
17 ('sorted t)
18 ('ignore-case t)))
19
20 (provide 'company-ispell)
21 ;;; company-ispell.el ends here