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

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

[elpa] master 5569424 25/31: Revert "company-clang: Skip over identity p


From: Dmitry Gutov
Subject: [elpa] master 5569424 25/31: Revert "company-clang: Skip over identity preprocessor #defines"
Date: Sun, 14 Apr 2019 22:06:20 -0400 (EDT)

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

    Revert "company-clang: Skip over identity preprocessor #defines"
    
    This reverts commit d00bbbac3be99d042024734fc417ecad253a52e4.
    
    Fixes #884.
---
 NEWS.md          |  3 +++
 company-clang.el | 11 +++++------
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/NEWS.md b/NEWS.md
index 5391bb5..da2d1d2 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,9 @@
 
 ## Next
 
+* The change in `company-clang` regarding identity #defines is reverted because
+  it affected other completions as well
+  ([#884](https://github.com/company-mode/company-mode/issues/884)).
 * `company-idle-delay` now accepts a function which generates the idle time or
   nil indicating no idle completion.
 * Add custom variable `company-show-numbers-function` to make numbers of
diff --git a/company-clang.el b/company-clang.el
index d43eebb..962db1e 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -134,12 +134,11 @@ 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)))
-          (unless (equal match meta)
-            (when meta
-              (put-text-property 0 1 'meta
-                                 (company-clang--strip-formatting meta)
-                                 match))
-            (push match lines)))))
+          (when (and meta (not (string= match meta)))
+            (put-text-property 0 1 'meta
+                               (company-clang--strip-formatting meta)
+                               match)))
+        (push match lines)))
     lines))
 
 (defun company-clang--meta (candidate)



reply via email to

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