[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ELPA-diffs] [elpa] 13/14: Fix a broken test, remove a duplicate one
From: |
emacs-devel |
Subject: |
[ELPA-diffs] [elpa] 13/14: Fix a broken test, remove a duplicate one |
Date: |
Tue, 14 Jan 2014 20:57:14 +0000 |
This is an automated email from the git hooks/post-receive script.
root pushed a commit to branch master
in repository elpa.
commit 67a96dbbfe645b64291ed62eab6f1eb391a834e0
Author: Dmitry Gutov <address@hidden>
Date: Tue Jan 14 15:20:59 2014 +0200
Fix a broken test, remove a duplicate one
---
company-tests.el | 18 ++----------------
company.el | 14 +++++++-------
2 files changed, 9 insertions(+), 23 deletions(-)
diff --git a/company-tests.el b/company-tests.el
index b111822..e9116b2 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -166,6 +166,7 @@
(with-temp-buffer
(company-mode)
(let (company-frontends
+ company-end-of-buffer-workaround
(company-backends
(list (lambda (command &optional arg)
(case command
@@ -177,7 +178,7 @@
(company-complete))
(should (string= "ab" (buffer-string)))
(delete-char -2)
- (insert "AB") ; hack, to keep it in one test
+ (insert "A") ; hack, to keep it in one test
(company-complete-selection)
(should (string= "abcd" (buffer-string))))))
@@ -210,21 +211,6 @@
(candidates '("tea-cup" "teal-color")))))))
(let (this-command)
(company-complete))
- (should (string= "tc" (buffer-string))))))
-
-(ert-deftest company-non-prefix-completion ()
- (with-temp-buffer
- (insert "tc")
- (company-mode)
- (let (company-frontends
- company-end-of-buffer-workaround
- (company-backends
- (list (lambda (command &optional arg)
- (case command
- (prefix (buffer-substring (point-min) (point)))
- (candidates '("tea-cup" "teal-color")))))))
- (let (this-command)
- (company-complete))
(should (string= "tc" (buffer-string)))
(company-complete-selection)
(should (string= "tea-cup" (buffer-string))))))
diff --git a/company.el b/company.el
index 1015415..1a324c7 100644
--- a/company.el
+++ b/company.el
@@ -828,13 +828,13 @@ can retrieve meta-data for them."
;; Save in cache:
(push (cons company-prefix company-candidates) company-candidates-cache)
;; Calculate common.
- (let ((completion-ignore-case (company-call-backend 'ignore-case))
- ;; We want to support non-prefix completion, so filtering is the
- ;; responsibility of each respective backend, not ours.
- ;; On the other hand, we don't want to replace non-prefix input in
- ;; `company-complete-common'.
- (common (try-completion company-prefix company-candidates)))
- (setq company-common (company--safe-candidate common))))
+ (let ((completion-ignore-case (company-call-backend 'ignore-case)))
+ ;; We want to support non-prefix completion, so filtering is the
+ ;; responsibility of each respective backend, not ours.
+ ;; On the other hand, we don't want to replace non-prefix input in
+ ;; `company-complete-common'.
+ (setq company-common (company--safe-candidate
+ (try-completion company-prefix
company-candidates)))))
(defun company--safe-candidate (str)
(or (company-call-backend 'crop str)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
- [ELPA-diffs] [elpa] 10/14: * packages/company/company-etags.el: Require `cl' for `case'. * packages/company/company-oddmuse.el: Avoid `eval-when'., (continued)
- [ELPA-diffs] [elpa] 10/14: * packages/company/company-etags.el: Require `cl' for `case'. * packages/company/company-oddmuse.el: Avoid `eval-when'., emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 02/14: Add option to wrap around selection in popup, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 01/14: Include emacs22 in the Travis build again, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 03/14: company-elisp: enable in inferior-emacs-lisp-mode, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 05/14: Fix #43, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 09/14: company-capf: Perform sorting before prefix adjustment, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 04/14: company--should-complete: Don't check if we're in minibuffer, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 08/14: Fix http://debbugs.gnu.org/16334, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 06/14: Require cl before using cl, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 11/14: Replace company-elisp with company-capf, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 13/14: Fix a broken test, remove a duplicate one,
emacs-devel <=
- [ELPA-diffs] [elpa] 12/14: Close #45, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 07/14: Merge pull request #44 from dcolascione/master, emacs-devel, 2014/01/14
- [ELPA-diffs] [elpa] 14/14: Merge commit '67a96dbbfe645b64291ed62eab6f1eb391a834e0' from company, emacs-devel, 2014/01/14