X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/7afffbc99040f50b032713276936511deaaf0568..779de03e226b161a00c3428ffdadd89ecbc422d0:/company-ispell.el diff --git a/company-ispell.el b/company-ispell.el index 91f43df9b..c275bbe41 100644 --- a/company-ispell.el +++ b/company-ispell.el @@ -1,6 +1,6 @@ ;;; company-ispell.el --- company-mode completion backend using Ispell -;; Copyright (C) 2009-2011, 2013-2015 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011, 2013-2016 Free Software Foundation, Inc. ;; Author: Nikolaj Schumacher @@ -41,11 +41,16 @@ If nil, use `ispell-complete-word-dict'." (defvar company-ispell-available 'unknown) +(defalias 'company-ispell--lookup-words + (if (fboundp 'ispell-lookup-words) + 'ispell-lookup-words + 'lookup-words)) + (defun company-ispell-available () (when (eq company-ispell-available 'unknown) (condition-case err (progn - (lookup-words "WHATEVER") + (company-ispell--lookup-words "WHATEVER") (setq company-ispell-available t)) (error (message "Company: ispell-look-command not found") @@ -61,8 +66,9 @@ If nil, use `ispell-complete-word-dict'." (prefix (when (company-ispell-available) (company-grab-word))) (candidates - (let ((words (lookup-words arg (or company-ispell-dictionary - ispell-complete-word-dict))) + (let ((words (company-ispell--lookup-words + arg + (or company-ispell-dictionary ispell-complete-word-dict))) (completion-ignore-case t)) (if (string= arg "") ;; Small optimization.