From: Alan Mackenzie <acm@muc.de>
Date: Thu, 19 Apr 2018 20:42:17 +0000 (+0000)
Subject: Amend c-colon-type-list-re also to handle compound identifiers
X-Git-Tag: emacs-27.0.90~5134
X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5a45a6bfe06afbe0e76544acec02b694611c777f;p=emacs.git

Amend c-colon-type-list-re also to handle compound identifiers

* lisp/progmodes/cc-langs.el (c-colon-type-list-re): Amend to recognize and
skip over "::" in C++ and "." in Java.
---

diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 8671e18e2d7..4a7c79a6dfa 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -2461,7 +2461,11 @@ regexp if `c-colon-type-list-kwds' isn't nil."
 	;; before the ":" that starts the inherit list after "class"
 	;; or "struct" in C++.  (Also used as default for other
 	;; languages.)
-	"[^][{}();,/#=:]*:"))
+	(if (c-lang-const c-opt-identifier-concat-key)
+	    (concat "\\([^][{}();,/#=:]\\|"
+		    (c-lang-const c-opt-identifier-concat-key)
+		    "\\)*:")
+	  "[^][{}();,/#=:]*:")))
 (c-lang-defvar c-colon-type-list-re (c-lang-const c-colon-type-list-re))
 
 (c-lang-defconst c-paren-nontype-kwds