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

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

[elpa] master ebf1301 04/31: Merge branch 'master' into forced-completio


From: Dmitry Gutov
Subject: [elpa] master ebf1301 04/31: Merge branch 'master' into forced-completion-for-unique-match
Date: Sun, 14 Apr 2019 22:06:15 -0400 (EDT)

branch: master
commit ebf1301b8d86de3144e4732b6d3b854fec37f7b2
Merge: 5d3e689 ac82e87
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Merge branch 'master' into forced-completion-for-unique-match
---
 NEWS.md         |  4 +++-
 company-capf.el |  4 +---
 company.el      | 10 ++++++++--
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/NEWS.md b/NEWS.md
index d2c0ac6..72f86d7 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,7 +1,9 @@
 # History of user-visible changes
 
-## Next
+## 2018-12-13 (0.9.9)
 
+* Fix for the changes in the previous release.
+* New hook `company-after-completion-hook`.
 * `company-clang` removes identity preprocessor #defines from completions
   ([#841](https://github.com/company-mode/company-mode/issues/841)).
 
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 973be1b..83b3bb0 100644
--- a/company.el
+++ b/company.el
@@ -5,7 +5,7 @@
 ;; Author: Nikolaj Schumacher
 ;; Maintainer: Dmitry Gutov <address@hidden>
 ;; URL: http://company-mode.github.io/
-;; Version: 0.9.8
+;; Version: 0.9.9
 ;; Keywords: abbrev, convenience, matching
 ;; Package-Requires: ((emacs "24.3"))
 
@@ -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"))
@@ -1638,7 +1643,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]