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

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

[elpa] 47/52: Don't call post-completion methods and hook in continue-fa


From: Dmitry Gutov
Subject: [elpa] 47/52: Don't call post-completion methods and hook in continue-failed case
Date: Tue, 01 Jul 2014 11:53:33 +0000

dgutov pushed a commit to branch master
in repository elpa.

commit f61b8c41714d1e41c2be36e60feedec0ac1ce512
Author: Dmitry Gutov <address@hidden>
Date:   Fri Jun 27 06:44:45 2014 +0300

    Don't call post-completion methods and hook in continue-failed case
    
    Possibly related to #145.
---
 company.el |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/company.el b/company.el
index 485df72..23b2317 100644
--- a/company.el
+++ b/company.el
@@ -1336,8 +1336,10 @@ from the rest of the back-ends in the group, if any, 
will be left at the end."
       (message "Matching input is required")
       company-candidates)
      ((equal company-prefix (car company-candidates))
-      ;; last input was actually success
-      (company-cancel company-prefix))
+      ;; Last input was a success,
+      ;; but we're treating it as an abort + input anyway,
+      ;; like the `unique' case below.
+      (company-cancel 'non-unique))
      (t (company-cancel)))))
 
 (defun company--good-prefix-p (prefix)
@@ -1365,7 +1367,8 @@ from the rest of the back-ends in the group, if any, will 
be left at the end."
      ((eq c t)
       ;; t means complete/unique.
       ;; Handle it like completion was aborted, to differentiate from user
-      ;; calling one of Company's commands to insert the candidate.
+      ;; calling one of Company's commands to insert the candidate,
+      ;; not to trigger template expansion, etc.
       (company-cancel 'unique))
      ((consp c)
       ;; incremental match
@@ -1468,7 +1471,7 @@ from the rest of the back-ends in the group, if any, will 
be left at the end."
 
 (defun company-abort ()
   (interactive)
-  (company-cancel t))
+  (company-cancel 'abort))
 
 (defun company-finish (result)
   (company--insert-candidate result)



reply via email to

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