]> git.eshelyaron.com Git - emacs.git/commitdiff
Parse C++ inher-intro when there's a template split over 2 lines.
authorAlan Mackenzie <acm@muc.de>
Sun, 25 Aug 2013 13:52:14 +0000 (13:52 +0000)
committerAlan Mackenzie <acm@muc.de>
Sun, 25 Aug 2013 13:52:14 +0000 (13:52 +0000)
* progmodes/cc-engine.el (c-guess-basic-syntax CASE 5C): Code more
rigorously the search for "class" etc. followed by ":".

* progmodes/cc-langs.el (c-opt-<>-sexp-key): Make the value for
random languages a regexp which never matches rather than nil.

lisp/ChangeLog
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-langs.el

index 4d4227a2a0f3457cf1c408fa7af2ea6bb8a7c447..cbeea784579d7b8b5989ebffc865370b539fecb0 100644 (file)
@@ -1,5 +1,13 @@
 2013-08-25  Alan Mackenzie  <acm@muc.de>
 
+       Parse C++ inher-intro when there's a template split over 2 lines.
+
+       * progmodes/cc-engine.el (c-guess-basic-syntax CASE 5C): Code more
+       rigorously the search for "class" etc. followed by ":".
+
+       * progmodes/cc-langs.el (c-opt-<>-sexp-key): Make the value for
+       random languages a regexp which never matches rather than nil.
+
        Handle "/"s more accurately in test for virtual semicolons (AWK Mode).
 
        * progmodes/cc-awk.el (c-awk-one-line-possibly-open-string-re)
index 2b9b6548e6f909ee3059074f6cd45947e2c42da0..3d6398014dbbd16d3c31472dff243648bb582ffd 100644 (file)
@@ -9799,12 +9799,12 @@ comment at the start of cc-engine.el for more info."
                              (not (eq (char-after) ?:))
                              )))
                   (save-excursion
-                    (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)
index 2c0a1317b046c9371470d5f25122d5ff2a0bed8c..0116e9ec3ddcd224a51d171a1e798853cf3cf3df 100644 (file)
@@ -2163,8 +2163,7 @@ assumed to be set if this isn't nil."
 (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