]> code.delx.au - gnu-emacs-elpa/commitdiff
company-clang-begin-after-member-access: include C++'s scope operator
authorDmitry Gutov <dgutov@yandex.ru>
Mon, 6 May 2013 10:06:00 +0000 (14:06 +0400)
committerDmitry Gutov <dgutov@yandex.ru>
Mon, 6 May 2013 10:06:14 +0000 (14:06 +0400)
company-clang.el

index 6abebe7e36fd4c17d87acb85227f39f70cce916c..bdf8ca4df8fe3c9e91110ef56a5e870f2b2c9d72 100644 (file)
   :type 'file)
 
 (defcustom company-clang-begin-after-member-access t
-  "When non-nil, automatic completion will start whenever the current symbol
-is preceded by \".\" or \"->\", ignoring `company-minimum-prefix-length'.
+  "When non-nil, automatic completion will start whenever the current symbol is
+preceded by \".\", \"->\" or \"::\", ignoring `company-minimum-prefix-length'.
 
-If `company-begin-commands' is a list, it should include `c-electric-lt-gt'.")
+If `company-begin-commands' is a list, it should include `c-electric-lt-gt' and
+`c-electric-colon', for automatic completion right after \">\" and \":\".")
 
 (defcustom company-clang-arguments nil
   "Additional arguments to pass to clang when completing.
@@ -213,7 +214,7 @@ Prefix files (-include ...) can be selected with
         (if (and company-clang-begin-after-member-access
                  (save-excursion
                    (forward-char (- (length symbol)))
-                   (looking-back "\\.\\|->" (- (point) 3))))
+                   (looking-back "\\.\\|->\\|::" (- (point) 2))))
             (cons symbol t)
           symbol)
       'stop)))