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

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

[elpa] master d461e05 8/8: Merge commit 'ac82e875e144b227e926c09c53def9b


From: Dmitry Gutov
Subject: [elpa] master d461e05 8/8: Merge commit 'ac82e875e144b227e926c09c53def9b0c059115c' from company
Date: Wed, 12 Dec 2018 17:46:41 -0500 (EST)

branch: master
commit d461e05ded00825f4692d1d7c2eb5cd6206d8290
Merge: a61b7e3 ac82e87
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Merge commit 'ac82e875e144b227e926c09c53def9b0c059115c' from company
---
 packages/company/NEWS.md          | 11 ++++++++++-
 packages/company/company-capf.el  |  4 +---
 packages/company/company-clang.el | 11 ++++++-----
 packages/company/company.el       | 12 +++++++++---
 4 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/packages/company/NEWS.md b/packages/company/NEWS.md
index 753bd6e..72f86d7 100644
--- a/packages/company/NEWS.md
+++ b/packages/company/NEWS.md
@@ -1,8 +1,17 @@
 # History of user-visible changes
 
+## 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)).
+
 ## 2018-12-08 (0.9.8)
 
-* CAPF backend fixed to use the right `:exit-function`
+* CAPF backend fixed to use the right `:exit-function`. It can now safely be a
+  closure with lexical context capturing the buffer state at the moment when 
the
+  completion table was returned
   ([#845](https://github.com/company-mode/company-mode/pull/845)).
 
 ## 2018-11-06 (0.9.7)
diff --git a/packages/company/company-capf.el b/packages/company/company-capf.el
index 311dd24..64b3de9 100644
--- a/packages/company/company-capf.el
+++ b/packages/company/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/packages/company/company-clang.el 
b/packages/company/company-clang.el
index 962db1e..d43eebb 100644
--- a/packages/company/company-clang.el
+++ b/packages/company/company-clang.el
@@ -134,11 +134,12 @@ or automatically through a custom 
`company-clang-prefix-guesser'."
           (when (string-match ":" match)
             (setq match (substring match 0 (match-beginning 0)))))
         (let ((meta (match-string-no-properties 2)))
-          (when (and meta (not (string= match meta)))
-            (put-text-property 0 1 'meta
-                               (company-clang--strip-formatting meta)
-                               match)))
-        (push match lines)))
+          (unless (equal match meta)
+            (when meta
+              (put-text-property 0 1 'meta
+                                 (company-clang--strip-formatting meta)
+                                 match))
+            (push match lines)))))
     lines))
 
 (defun company-clang--meta (candidate)
diff --git a/packages/company/company.el b/packages/company/company.el
index 458aeeb..47f353e 100644
--- a/packages/company/company.el
+++ b/packages/company/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"))
@@ -1430,7 +1435,7 @@ prefix match (same case) will be prioritized."
        (not company-candidates)
        (let ((company-idle-delay 'now))
          (condition-case-unless-debug err
-             (progn
+             (let ((inhibit-quit nil))
                (company--perform)
                ;; Return non-nil if active.
                company-candidates)
@@ -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]