Alan Mackenzie  committed b618fcc

Parse C++ inher-intro when there's a template split over 2 lines.
cc-engine.el (c-guess-basic-syntax CASE 5C): Code more rigorously the
search for "class" etc. followed by ":".
cc-langs.el (c-opt-<>-sexp-key): Make the value for random languages a
regexp which never matches rather than nil.
tests/inher-10.{cc,res}: New test case.

  • Participants
  • Parent commits f75f853

Comments (0)

Files changed (2)

File cc-engine.el

 			      (not (eq (char-after) ?:))
-		     (c-backward-syntactic-ws lim)
-		     (if (eq char-before-ip ?:)
-			 (progn
-			   (forward-char -1)
-			   (c-backward-syntactic-ws lim)))
-		     (back-to-indentation)
+		     (c-beginning-of-statement-1 lim)
+		     (when (looking-at c-opt-<>-sexp-key)
+		       (goto-char (match-end 1))
+		       (c-forward-syntactic-ws)
+		       (c-forward-<>-arglist nil)
+		       (c-forward-syntactic-ws))
 		     (looking-at c-class-key)))
 	      ;; for Java
 	      (and (c-major-mode-is 'java-mode)
 (c-lang-defconst c-opt-<>-sexp-key
   ;; Adorned regexp matching keywords that can be followed by an angle
   ;; bracket sexp.  Always set when `c-recognize-<>-arglists' is.
-  t (if (c-lang-const c-recognize-<>-arglists)
-	(c-make-keywords-re t (c-lang-const c-<>-sexp-kwds))))
+  t (c-make-keywords-re t (c-lang-const c-<>-sexp-kwds)))
 (c-lang-defvar c-opt-<>-sexp-key (c-lang-const c-opt-<>-sexp-key))
 (c-lang-defconst c-brace-id-list-kwds