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

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

[elpa] master aabf0a3 5/8: Fix the exit-function fix


From: Dmitry Gutov
Subject: [elpa] master aabf0a3 5/8: Fix the exit-function fix
Date: Wed, 12 Dec 2018 17:46:41 -0500 (EST)

branch: master
commit aabf0a35df3d1507b9341bdf7a5afa3ee9f18c17
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Fix the exit-function fix
    
    #845
    
    
https://github.com/company-mode/company-mode/commit/526aa5b3cffb93e07313ace7a3902be19f46eddf#r31656876
---
 company-capf.el | 4 +---
 company.el      | 8 +++++++-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/company-capf.el b/company-capf.el
index 311dd24..64b3de9 100644
--- a/company-capf.el
+++ b/company-capf.el
@@ -77,9 +77,7 @@ that accompanied the completion table that's currently is 
use.")
 
 (defun company-capf--save-current-data (data)
   (setq company-capf--current-completion-data data)
-  (add-hook 'company-completion-cancelled-hook
-            #'company-capf--clear-current-data nil t)
-  (add-hook 'company-completion-finished-hook
+  (add-hook 'company-after-completion-hook
             #'company-capf--clear-current-data nil t))
 
 (defun company-capf--clear-current-data (_ignored)
diff --git a/company.el b/company.el
index 5676583..b86574c 100644
--- a/company.el
+++ b/company.el
@@ -511,6 +511,11 @@ If you indend to use it to post-process candidates from a 
specific
 backend, consider using the `post-completion' command instead."
   :type 'hook)
 
+(defcustom company-after-completion-hook nil
+  "Hook run at the end of completion, successful or not.
+The hook is called with one argument which is either a string or a symbol."
+  :type 'hook)
+
 (defcustom company-minimum-prefix-length 3
   "The minimum prefix length for idle completion."
   :type '(integer :tag "prefix length"))
@@ -1637,7 +1642,8 @@ prefix match (same case) will be prioritized."
           (let ((company-backend backend))
             (run-hook-with-args 'company-completion-finished-hook result)
             (company-call-backend 'post-completion result))
-        (run-hook-with-args 'company-completion-cancelled-hook result))))
+        (run-hook-with-args 'company-completion-cancelled-hook result))
+      (run-hook-with-args 'company-after-completion-hook result)))
   ;; Make return value explicit.
   nil)
 



reply via email to

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