branch: externals/cape
commit 11cc35cc890c4789a12ca32e35917a15ec2bc1c5
Author: Daniel Mendler <m...@daniel-mendler.de>
Commit: Daniel Mendler <m...@daniel-mendler.de>

    cape-wrap-super: Do not use private completion--some
    
    completion--some is private and performs unnecessary error handling. The
    assumption is that none of the merged tables throws an error.
---
 cape.el | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/cape.el b/cape.el
index 0d706f5644..57935f12ae 100644
--- a/cape.el
+++ b/cape.el
@@ -887,16 +887,14 @@ The functions `cape-wrap-super' and `cape-capf-super' are 
experimental."
                 (setq cand-ht ht)
                 (delq nil (apply #'nconc (nreverse candidates)))))
              (_ ;; try-completion and test-completion
-              (completion--some
-               (pcase-lambda (`(,table . ,plist))
-                 (complete-with-action
-                  action table str
-                  (if-let (pr (plist-get plist :predicate))
-                      (if pred
-                          (lambda (x) (and (funcall pr x) (funcall pred x)))
-                        pr)
-                    pred)))
-               tables))))
+              (cl-loop for (table . plist) in tables thereis
+                       (complete-with-action
+                        action table str
+                        (if-let (pr (plist-get plist :predicate))
+                            (if pred
+                                (lambda (x) (and (funcall pr x) (funcall pred 
x)))
+                              pr)
+                          pred))))))
         :exclusive no
         :company-prefix-length ,prefix-len
         ,@(mapcan

Reply via email to