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

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

[elpa] 03/52: company-clang: don't mistake scoping operator for objc arg


From: Dmitry Gutov
Subject: [elpa] 03/52: company-clang: don't mistake scoping operator for objc args
Date: Tue, 01 Jul 2014 11:53:04 +0000

dgutov pushed a commit to branch master
in repository elpa.

commit 43283ba0be1246b3eb60de65c7c0ce6e7d078d28
Author: Dmitry Gutov <address@hidden>
Date:   Mon Apr 28 14:05:35 2014 +0400

    company-clang: don't mistake scoping operator for objc args
---
 company-clang.el |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/company-clang.el b/company-clang.el
index 4f0f318..1ddb7ca 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -145,7 +145,7 @@ or automatically through a custom 
`company-clang-prefix-guesser'."
   (let ((meta (company-clang--meta candidate)))
     (cond
      ((null meta) nil)
-     ((string-match ":" meta)
+     ((string-match "[^:]:[^:]" meta)
       (substring meta (match-beginning 0)))
      ((string-match "\\((.*)\\'\\)" meta)
       (match-string 1 meta)))))
@@ -316,9 +316,9 @@ passed via standard input."
     (post-completion (let ((anno (company-clang--annotation arg)))
                        (when (and company-clang-insert-arguments anno)
                          (insert anno)
-                         (if (string-match ":" anno)
+                         (if (string-match "[^:]:[^:]" anno)
                              (company-clang-objc-templatify anno)
-                          (company-template-c-like-templatify anno)))))))
+                           (company-template-c-like-templatify anno)))))))
 
 (provide 'company-clang)
 ;;; company-clang.el ends here



reply via email to

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