[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 6846466 01/66: company-capf: Distinguish between `finished
From: |
Dmitry Gutov |
Subject: |
[elpa] master 6846466 01/66: company-capf: Distinguish between `finished' and `exact' in post-completion |
Date: |
Tue, 13 Jan 2015 02:44:41 +0000 |
branch: master
commit 6846466bbbc912673682e8a5ac6f91c51452ae51
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
company-capf: Distinguish between `finished' and `exact' in post-completion
Fixes #217
---
company-capf.el | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/company-capf.el b/company-capf.el
index b630025..1a0e9ec 100644
--- a/company-capf.el
+++ b/company-capf.el
@@ -138,9 +138,14 @@
(`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)))
+ (exit-function (plist-get (nthcdr 4 res) :exit-function))
+ (table (nth 3 res))
+ (pred (plist-get (nthcdr 4 res) :predicate)))
(if exit-function
- (funcall exit-function arg 'finished))))
+ ;; Follow the example of `completion--done'.
+ (funcall exit-function arg
+ (if (eq (try-completion arg table pred) t)
+ 'finished 'exact)))))
))
(provide 'company-capf)
- [elpa] master updated (0ead54c -> 092486e), Dmitry Gutov, 2015/01/12
- [elpa] master 6846466 01/66: company-capf: Distinguish between `finished' and `exact' in post-completion,
Dmitry Gutov <=
- [elpa] master d4088c5 02/66: replace <LANG> <CONFIG> tag in variables, Dmitry Gutov, 2015/01/12
- [elpa] master 250f7af 04/66: s/Fortran/G77, Dmitry Gutov, 2015/01/12
- [elpa] master b6da724 03/66: Clean up a little, Dmitry Gutov, 2015/01/12
- [elpa] master 67ead1a 06/66: Bump the year, Dmitry Gutov, 2015/01/12
- [elpa] master eb03746 09/66: company-cmake--unexpand-candidate: Remove extra underscore, Dmitry Gutov, 2015/01/12
- [elpa] master 28f8dc6 11/66: Update NEWS, Dmitry Gutov, 2015/01/12
- [elpa] master e5627dd 12/66: company-etags-file-table: Check that TAGS is not a directory, Dmitry Gutov, 2015/01/12
- [elpa] master e66f2c3 13/66: company-bbdb: Use the whole line content after `: ' as prefix, Dmitry Gutov, 2015/01/12
- [elpa] master 79d4b0d 10/66: company-cmake: Support G77/Fortran distinction, Dmitry Gutov, 2015/01/12
- [elpa] master 4375685 14/66: company-complete-number: Handle keypad events, Dmitry Gutov, 2015/01/12