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

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

[elpa] 31/35: Introduce company-clang-insert-arguments


From: Dmitry Gutov
Subject: [elpa] 31/35: Introduce company-clang-insert-arguments
Date: Sat, 19 Apr 2014 10:12:21 +0000

dgutov pushed a commit to branch master
in repository elpa.

commit 012887ae4ab7f7fe6fd582e45c8f28ed605e1218
Author: Dmitry Gutov <address@hidden>
Date:   Mon Apr 14 05:09:43 2014 +0400

    Introduce company-clang-insert-arguments
    
    Closes #102
---
 NEWS.md          |    1 +
 company-clang.el |    5 ++++-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/NEWS.md b/NEWS.md
index 591c9e7..9037b01 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,7 @@
 
 ## Next
 
+* New user option `company-clang-insert-arguments`, by default t.
 * Default value of `company-idle-delay` lowered to `0.5`.
 * New user option `company-tooltip-minimum-width`, by default 0.
 * New function `company-grab-symbol-cons`.
diff --git a/company-clang.el b/company-clang.el
index 14b6753..4f0f318 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -60,6 +60,9 @@ or automatically through a custom 
`company-clang-prefix-guesser'."
 (defvar company-clang-modes '(c-mode c++-mode objc-mode)
   "Major modes which clang may complete.")
 
+(defcustom company-clang-insert-arguments t
+  "When non-nil, insert function arguments as a template after completion.")
+
 ;; prefix 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (defvar company-clang--prefix nil)
@@ -311,7 +314,7 @@ passed via standard input."
     (meta       (company-clang--meta arg))
     (annotation (company-clang--annotation arg))
     (post-completion (let ((anno (company-clang--annotation arg)))
-                       (when anno
+                       (when (and company-clang-insert-arguments anno)
                          (insert anno)
                          (if (string-match ":" anno)
                              (company-clang-objc-templatify anno)



reply via email to

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