]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/company/company-clang.el
Add 'packages/names/' from commit 'b7bb062fc3c5de0c5bdb6dcf60da260d2a169783'
[gnu-emacs-elpa] / packages / company / company-clang.el
index a1a32512509ff5065c49f69a8db69118771df8ea..90757a84b957f52a05111d8ddf4333d67f1b7220 100644 (file)
@@ -51,7 +51,7 @@ and `c-electric-colon', for automatic completion right after \">\" and
   "Additional arguments to pass to clang when completing.
 Prefix files (-include ...) can be selected with `company-clang-set-prefix'
 or automatically through a custom `company-clang-prefix-guesser'."
-  :type '(repeat (string :tag "Argument" nil)))
+  :type '(repeat (string :tag "Argument")))
 
 (defcustom company-clang-prefix-guesser 'company-clang-guess-prefix
   "A function to determine the prefix file for the current buffer."
@@ -110,7 +110,7 @@ or automatically through a custom `company-clang-prefix-guesser'."
 ;; TODO: Handle Pattern (syntactic hints would be neat).
 ;; Do we ever see OVERLOAD (or OVERRIDE)?
 (defconst company-clang--completion-pattern
-  "^COMPLETION: \\_<\\(%s[a-zA-Z0-9_:]*\\)\\(?: : \\(.*\\)$\\)?$")
+  "^COMPLETION: \\_<\\(%s[a-zA-Z0-9_:<>]*\\)\\(?: : \\(.*\\)$\\)?$")
 
 (defconst company-clang--error-buffer-name "*clang-error*")
 
@@ -320,7 +320,8 @@ passed via standard input."
                          (insert anno)
                          (if (string-match "\\`:[^:]" anno)
                              (company-clang-objc-templatify anno)
-                           (company-template-c-like-templatify anno)))))))
+                           (company-template-c-like-templatify
+                            (concat arg anno))))))))
 
 (provide 'company-clang)
 ;;; company-clang.el ends here