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

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

[elpa] 10/31: company-auto-begin: wrap `company-begin' in `condition-cas


From: Dmitry Gutov
Subject: [elpa] 10/31: company-auto-begin: wrap `company-begin' in `condition-case-no-debug'
Date: Tue, 18 Mar 2014 05:19:35 +0000

dgutov pushed a commit to branch master
in repository elpa.

commit c3c4c44d8ec54e3ba3de9baf76772e6d391f222b
Author: Dmitry Gutov <address@hidden>
Date:   Mon Feb 24 08:48:01 2014 +0200

    company-auto-begin: wrap `company-begin' in `condition-case-no-debug'
---
 company.el |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/company.el b/company.el
index 5fab34a..dfbb2a3 100644
--- a/company.el
+++ b/company.el
@@ -1066,7 +1066,12 @@ Keywords and function definition names are ignored."
        (not company-candidates)
        (let ((company-idle-delay t)
              (company-begin-commands t))
-         (company-begin)))
+         (condition-case-no-debug err
+             (company-begin)
+           (error (message "Company: An error occurred in auto-begin")
+                  (message "%s" (error-message-string err))
+                  (company-cancel))
+           (quit (company-cancel)))))
   ;; Return non-nil if active.
   company-candidates)
 



reply via email to

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