From 9add1d8d3339153a5ec121a47e89bfc3ef1b1002 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Mon, 6 May 2013 14:06:00 +0400 Subject: [PATCH 1/1] company-clang-begin-after-member-access: include C++'s scope operator --- company-clang.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/company-clang.el b/company-clang.el index 6abebe7e3..bdf8ca4df 100644 --- a/company-clang.el +++ b/company-clang.el @@ -39,10 +39,11 @@ :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))) -- 2.39.2