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

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

[elpa] 15/31: Clear company-backend in company-auto-begin


From: Dmitry Gutov
Subject: [elpa] 15/31: Clear company-backend in company-auto-begin
Date: Tue, 18 Mar 2014 05:19:36 +0000

dgutov pushed a commit to branch master
in repository elpa.

commit f3ad43c61d514393765970212a475d783a030929
Author: Dmitry Gutov <address@hidden>
Date:   Wed Mar 5 07:55:02 2014 +0200

    Clear company-backend in company-auto-begin
---
 company.el |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/company.el b/company.el
index 5a064d4..2c7fa5f 100644
--- a/company.el
+++ b/company.el
@@ -1072,6 +1072,8 @@ Keywords and function definition names are ignored."
                   (message "%s" (error-message-string err))
                   (company-cancel))
            (quit (company-cancel)))))
+  (unless company-candidates
+    (setq company-backend nil))
   ;; Return non-nil if active.
   company-candidates)
 
@@ -1776,9 +1778,7 @@ To show the number next to the candidates in some 
back-ends, enable
   (setq company-backend backend)
   ;; Return non-nil if active.
   (or (company-manual-begin)
-      (progn
-        (setq company-backend nil)
-        (error "Cannot complete at point"))))
+      (error "Cannot complete at point")))
 
 (defun company-begin-with (candidates
                            &optional prefix-length require-match callback)



reply via email to

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