[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 02/35: More robust and simpler logic in prefix test
From: |
Dmitry Gutov |
Subject: |
[elpa] 02/35: More robust and simpler logic in prefix test |
Date: |
Sat, 19 Apr 2014 10:12:13 +0000 |
dgutov pushed a commit to branch master
in repository elpa.
commit 5e1c9bf016c05c2d08c66144278c29cb5fc9c3f1
Author: Ingo Lohmar <address@hidden>
Date: Tue Mar 25 22:41:49 2014 +0100
More robust and simpler logic in prefix test
---
company.el | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/company.el b/company.el
index 704b83b..7f327d4 100644
--- a/company.el
+++ b/company.el
@@ -1198,18 +1198,17 @@ Keywords and function definition names are ignored."
(t (company-cancel)))))
(defun company--good-prefix-p (prefix)
- (and (or (and company--manual-prefix
+ (and (stringp (or (car-safe prefix) prefix)) ;excludes 'stop
+ (or (and company--manual-prefix
;; changed selection not enough for valid prefix
(not (and company-abort-manual-when-too-short
;; must not be less than minimum or initial length
(< (or (cdr-safe prefix) (length prefix))
(min company-minimum-prefix-length
(length company--manual-prefix))))))
- (unless (eq prefix 'stop)
- (or (eq (cdr-safe prefix) t)
- (>= (or (cdr-safe prefix) (length prefix))
- company-minimum-prefix-length))))
- (stringp (or (car-safe prefix) prefix))))
+ (or (eq (cdr-safe prefix) t)
+ (>= (or (cdr-safe prefix) (length prefix))
+ company-minimum-prefix-length)))))
(defun company--continue ()
(when (company-call-backend 'no-cache company-prefix)
- [elpa] branch master updated (0c8e3a1 -> 77719a9), Dmitry Gutov, 2014/04/19
- [elpa] 02/35: More robust and simpler logic in prefix test,
Dmitry Gutov <=
- [elpa] 03/35: Test new prefix behavior, option company-abort-manual-when-too-short, Dmitry Gutov, 2014/04/19
- [elpa] 08/35: Use `condition-case-unless-debug', Dmitry Gutov, 2014/04/19
- [elpa] 04/35: Minor tweaks, Dmitry Gutov, 2014/04/19
- [elpa] 07/35: Drop support for `crop', Dmitry Gutov, 2014/04/19
- [elpa] 10/35: Bump version, Dmitry Gutov, 2014/04/19
- [elpa] 09/35: Add Package-Requires header, Dmitry Gutov, 2014/04/19
- [elpa] 13/35: Make company-clang work asynchronously, Dmitry Gutov, 2014/04/19
- [elpa] 12/35: Remove `company-locate-dominating-file', Dmitry Gutov, 2014/04/19
- [elpa] 16/35: Update NEWS, Dmitry Gutov, 2014/04/19
- [elpa] 17/35: company--merge-async: tweak, Dmitry Gutov, 2014/04/19