[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 4cd4c3a 123/173: Turn :company-prefix-length property into
From: |
Dmitry Gutov |
Subject: |
[elpa] master 4cd4c3a 123/173: Turn :company-prefix-length property into a value |
Date: |
Thu, 23 Jun 2016 00:28:44 +0000 (UTC) |
branch: master
commit 4cd4c3a7bf5ab0eb62e27be0d4c9fce7011c6d43
Author: Fredrik Bergroth <address@hidden>
Commit: Fredrik Bergroth <address@hidden>
Turn :company-prefix-length property into a value
---
NEWS.md | 2 +-
company-capf.el | 9 +++------
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/NEWS.md b/NEWS.md
index 33750f1..87ea896 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -5,7 +5,7 @@
* `company-semantic-insert-arguments`: New option. Like in `company-clang`.
* `company-semantic-begin-after-member-access`: New option. Similar to the one
in `company-clang`.
-* `company-capf` accepts `:company-prefix-length` property function.
+* `company-capf` accepts `:company-prefix-length` property value.
* New face `company-tooltip-annotation-selection`, used for the annotation in
the selected tooltip line.
* `company-clang-objc-templatify` has been renamed to
diff --git a/company-capf.el b/company-capf.el
index 6554782..9eeb248 100644
--- a/company-capf.el
+++ b/company-capf.el
@@ -72,13 +72,10 @@
(`prefix
(let ((res (company--capf-data)))
(when res
- (let* ((f (plist-get (nthcdr 4 res) :company-prefix-length))
- (beg (nth 1 res))
- (end (nth 2 res))
- (length (and f (funcall f beg (point))))
- (prefix (buffer-substring-no-properties beg (point))))
+ (let ((length (plist-get (nthcdr 4 res) :company-prefix-length))
+ (prefix (buffer-substring-no-properties (nth 1 res) (point))))
(cond
- ((> end (point)) 'stop)
+ ((> (nth 2 res) (point)) 'stop)
(length (cons prefix length))
(t prefix))))))
(`candidates
- [elpa] master ae0a406 139/173: Add some C++11 keywords, fixes #478, (continued)
- [elpa] master ae0a406 139/173: Add some C++11 keywords, fixes #478, Dmitry Gutov, 2016/06/22
- [elpa] master 9b89556 149/173: company-capf: Look up `face', not `font-lock-face', Dmitry Gutov, 2016/06/22
- [elpa] master d587bd0 156/173: Fix an old typo, Dmitry Gutov, 2016/06/22
- [elpa] master 2d9bf1e 160/173: company--preprocess-candidates: Check that all CANDIDATES are strings, Dmitry Gutov, 2016/06/22
- [elpa] master 395f846 159/173: Revert "Remove completions without annotations when considering duplicates", Dmitry Gutov, 2016/06/22
- [elpa] master 69228c7 168/173: Tag company-dabbrev-ignore-buffers with package-version, Dmitry Gutov, 2016/06/22
- [elpa] master be2f586 100/173: Add workaround for bug#18067, Dmitry Gutov, 2016/06/22
- [elpa] master df14727 110/173: Fix bbdb completion for multi-recipient messages, Dmitry Gutov, 2016/06/22
- [elpa] master 18a77b9 121/173: Improve the example in the Commentary, Dmitry Gutov, 2016/06/22
- [elpa] master c97828c 142/173: Clarify where callback must be called from, Dmitry Gutov, 2016/06/22
- [elpa] master 4cd4c3a 123/173: Turn :company-prefix-length property into a value,
Dmitry Gutov <=
- [elpa] master 18b0414 103/173: Declare python-shell-get-process, Dmitry Gutov, 2016/06/22
- [elpa] master 23c6f85 109/173: Merge pull request #450 from fbergroth/capf-prefix-function, Dmitry Gutov, 2016/06/22
- [elpa] master 5bfbb05 098/173: Add the pre-render backend command, Dmitry Gutov, 2016/06/22
- [elpa] master 3ec9d5d 145/173: Add Julia keywords, Dmitry Gutov, 2016/06/22
- [elpa] master 900ae0d 096/173: Add support for company-face, Dmitry Gutov, 2016/06/22
- [elpa] master 1221739 122/173: Improve the description of cons prefix, Dmitry Gutov, 2016/06/22
- [elpa] master ac7f816 134/173: Merge pull request #466 from tarsius/patch-1, Dmitry Gutov, 2016/06/22
- [elpa] master 9e844d1 124/173: Merge pull request #459 from fbergroth/prefix-length-var, Dmitry Gutov, 2016/06/22
- [elpa] master 31780fb 114/173: Revert "company-cancel: Call frontends' 'hide before 'post-completion", Dmitry Gutov, 2016/06/22
- [elpa] master a7e4408 152/173: Merge pull request #491 from akirakyle/patch-1, Dmitry Gutov, 2016/06/22