X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/a73cbc5c6f456d875d18e232998a2d0767747dc0..2d44e7fef7e7388759518cba1a424495119679d1:/packages/company/company-ispell.el diff --git a/packages/company/company-ispell.el b/packages/company/company-ispell.el index 0b8351533..1561beef1 100644 --- a/packages/company/company-ispell.el +++ b/packages/company/company-ispell.el @@ -1,6 +1,6 @@ -;;; company-ispell.el --- a company-mode completion back-end using ispell +;;; company-ispell.el --- company-mode completion back-end using Ispell -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Nikolaj Schumacher @@ -19,16 +19,23 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . + +;;; Commentary: +;; + ;;; Code: (require 'company) +(require 'cl-lib) (require 'ispell) -(eval-when-compile (require 'cl)) + +(defgroup company-ispell nil + "Completion back-end using Ispell." + :group 'company) (defcustom company-ispell-dictionary nil - "*Dictionary to use for `company-ispell'. + "Dictionary to use for `company-ispell'. If nil, use `ispell-complete-word-dict'." - :group 'company :type '(choice (const :tag "default (nil)" nil) (file :tag "dictionary" t))) @@ -47,16 +54,16 @@ If nil, use `ispell-complete-word-dict'." ;;;###autoload (defun company-ispell (command &optional arg &rest ignored) - "A `company-mode' completion back-end using ispell." + "`company-mode' completion back-end using Ispell." (interactive (list 'interactive)) - (case command - ('interactive (company-begin-backend 'company-ispell)) - ('prefix (when (company-ispell-available) - (company-grab-word))) - ('candidates (lookup-words arg (or company-ispell-dictionary - ispell-complete-word-dict))) - ('sorted t) - ('ignore-case t))) + (cl-case command + (interactive (company-begin-backend 'company-ispell)) + (prefix (when (company-ispell-available) + (company-grab-word))) + (candidates (lookup-words arg (or company-ispell-dictionary + ispell-complete-word-dict))) + (sorted t) + (ignore-case 'keep-prefix))) (provide 'company-ispell) ;;; company-ispell.el ends here