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

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

[elpa] master 2a21bfd 01/66: Extract company--capf-post-completion, for


From: Dmitry Gutov
Subject: [elpa] master 2a21bfd 01/66: Extract company--capf-post-completion, for easier debugging
Date: Mon, 5 Nov 2018 18:19:11 -0500 (EST)

branch: master
commit 2a21bfd4422c74c817062eb935088376ac3d09dc
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Extract company--capf-post-completion, for easier debugging
---
 company-capf.el | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/company-capf.el b/company-capf.el
index 06384c7..ffd9ea3 100644
--- a/company-capf.el
+++ b/company-capf.el
@@ -154,17 +154,20 @@
      (plist-get (nthcdr 4 (company--capf-data)) :company-require-match))
     (`init nil)      ;Don't bother: plenty of other ways to initialize the 
code.
     (`post-completion
-     (let* ((res (company--capf-data))
-            (exit-function (plist-get (nthcdr 4 res) :exit-function))
-            (table (nth 3 res))
-            (pred (plist-get (nthcdr 4 res) :predicate)))
-       (if exit-function
-           ;; Follow the example of `completion--done'.
-           (funcall exit-function arg
-                    (if (eq (try-completion arg table pred) t)
-                        'finished 'sole)))))
+     (company--capf-post-completion arg))
     ))
 
+(defun company--capf-post-completion (arg)
+  (let* ((res (company--capf-data))
+         (exit-function (plist-get (nthcdr 4 res) :exit-function))
+         (table (nth 3 res))
+         (pred (plist-get (nthcdr 4 res) :predicate)))
+    (if exit-function
+        ;; Follow the example of `completion--done'.
+        (funcall exit-function arg
+                 (if (eq (try-completion arg table pred) t)
+                     'finished 'sole)))))
+
 (provide 'company-capf)
 
 ;;; company-capf.el ends here



reply via email to

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