branch: externals/company
commit 42c2aa60b86c7fe5477feace6649eaf7811d0bba
Merge: 5404b3ab7d ff091f66a6
Author: Dmitry Gutov <dmi...@gutov.dev>
Commit: GitHub <nore...@github.com>

    Merge pull request #1459 from whatacold/master
    
    Let company-ispell-dictionary be compatible with the ~user notation.
---
 company-ispell.el | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/company-ispell.el b/company-ispell.el
index a777431597..d40d8c6eb4 100644
--- a/company-ispell.el
+++ b/company-ispell.el
@@ -39,7 +39,8 @@
 
 (defcustom company-ispell-dictionary nil
   "Dictionary to use for `company-ispell'.
-If nil, use `ispell-complete-word-dict'."
+
+If nil, use `ispell-complete-word-dict' or `ispell-alternate-dictionary'."
   :type '(choice (const :tag "default (nil)" nil)
                  (file :tag "dictionary" t))
   :set #'company--set-dictionary)
@@ -58,9 +59,12 @@ If nil, use `ispell-complete-word-dict'."
   company-ispell-available)
 
 (defun company--ispell-dict ()
-  (or company-ispell-dictionary
-      ispell-complete-word-dict
-      ispell-alternate-dictionary))
+  "Determine which dictionary to use."
+  (let ((dict (or company-ispell-dictionary
+                  ispell-complete-word-dict
+                  ispell-alternate-dictionary)))
+    (when dict
+      (expand-file-name dict))))
 
 ;;;###autoload
 (defun company-ispell (command &optional arg &rest _ignored)

Reply via email to