]> code.delx.au - gnu-emacs-elpa/blobdiff - company-ispell.el
company-etags-find-table: fix fallback tags file expansion
[gnu-emacs-elpa] / company-ispell.el
index 1561beef1a1b62e633c79ae4451c5a53d8fa1be8..4ce8dfc111ecbe8018256ade1ec86becab52d30c 100644 (file)
@@ -1,6 +1,6 @@
 ;;; company-ispell.el --- company-mode completion back-end using Ispell
 
-;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2011, 2013-2015  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -60,8 +60,15 @@ If nil, use `ispell-complete-word-dict'."
     (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)))
+    (candidates
+     (let ((words (lookup-words arg (or company-ispell-dictionary
+                                        ispell-complete-word-dict)))
+           (completion-ignore-case t))
+       (if (string= arg "")
+           ;; Small optimization.
+           words
+         ;; Work around issue #284.
+         (all-completions arg words))))
     (sorted t)
     (ignore-case 'keep-prefix)))