emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master e293378 50/62: Fix completion falling back to other backen


From: Ian Dunn
Subject: [elpa] master e293378 50/62: Fix completion falling back to other backend
Date: Sat, 9 Dec 2017 14:34:05 -0500 (EST)

branch: master
commit e293378214f315d354ad6c4cf15e86e9f3a61872
Author: Ian Dunn <address@hidden>
Commit: Ian Dunn <address@hidden>

    Fix completion falling back to other backend
    
    * paced.el (paced-completion-table-function): Don't throw an error if there 
is
      no current dictionary.
      (paced-completion-at-point): Fix spelling of "exclusive".
---
 paced.el | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/paced.el b/paced.el
index a2b970a..20d6403 100644
--- a/paced.el
+++ b/paced.el
@@ -730,18 +730,17 @@ the prefix before completions are returned."
 
 (defun paced-completion-table-function (string pred action)
   "Completion table function for paced dictionaries."
-  (if-let* ((dict (paced-current-dictionary)))
-      (let* ((completion-ignore-case paced-completion-ignore-case))
-        (pcase action
-          ((or `nil `t `lambda)
-           (paced-dictionary-completions dict string action pred))
-          (`(boundaries . _) nil)
-          (`metadata
-           `(metadata . ((category . paced)
-                         (annotation-function . nil)
-                         (display-sort-function . identity)
-                         (cycle-sort-function . identity))))))
-    (user-error "No dictionary found for current buffer")))
+  (let* ((completion-ignore-case paced-completion-ignore-case))
+    (pcase action
+      ((or `nil `t `lambda)
+       (when-let* ((dict (paced-current-dictionary)))
+         (paced-dictionary-completions dict string action pred)))
+      (`(boundaries . _) nil)
+      (`metadata
+       `(metadata . ((category . paced)
+                     (annotation-function . nil)
+                     (display-sort-function . identity)
+                     (cycle-sort-function . identity)))))))
 
 (defcustom paced-auto-update-p nil
   "Whether to update from completions.
@@ -773,7 +772,7 @@ This should only be called from 
`paced-completion-at-point'."
     (when-let* ((bounds (paced-bounds-of-thing-at-point)))
       (list (car bounds) (cdr bounds) 'paced-completion-table-function
             :exit-function 'paced-completion-auto-update
-            :excludsive 'no))))
+            :exclusive 'no))))
 
 
                                         ; ;;;;;;;;;;;;;;;;;; ;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]