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

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

[elpa] 18/31: company--multi-backend-adapter: noop when arg is empty


From: Dmitry Gutov
Subject: [elpa] 18/31: company--multi-backend-adapter: noop when arg is empty
Date: Tue, 18 Mar 2014 05:19:37 +0000

dgutov pushed a commit to branch master
in repository elpa.

commit 6183a7404434cc68f2a25bf78fb02ce69c1b4b95
Author: Dmitry Gutov <address@hidden>
Date:   Tue Mar 11 15:13:16 2014 +0200

    company--multi-backend-adapter: noop when arg is empty
---
 company.el |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/company.el b/company.el
index fd01f74..0945b9a 100644
--- a/company.el
+++ b/company.el
@@ -794,10 +794,11 @@ means that `company-mode' is always turned on except in 
`message-mode' buffers."
            (when (setq value (apply backend command args))
              (return value)))))
       (otherwise
-       (let* ((arg (car args))
-              (backend (or (get-text-property 0 'company-backend arg)
-                           (car backends))))
-         (apply backend command args))))))
+       (let ((arg (car args)))
+         (when (> (length arg) 0)
+           (let ((backend (or (get-text-property 0 'company-backend arg)
+                              (car backends))))
+             (apply backend command args))))))))
 
 ;;; completion mechanism 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 



reply via email to

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