]> git.eshelyaron.com Git - emacs.git/commitdiff
(c-specifier-key): Exclude "template" from this regexp; to allow the "{"
authorAlan Mackenzie <acm@muc.de>
Tue, 29 Jan 2008 20:33:38 +0000 (20:33 +0000)
committerAlan Mackenzie <acm@muc.de>
Tue, 29 Jan 2008 20:33:38 +0000 (20:33 +0000)
of a template function to be correctly anchored on "template", not the
following "<".

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

index b6916f18d090026bcaf4c7f0ce1bdc53c37b3c1a..c089bb61f5eb36d4e748abdf51e8163690280b6b 100644 (file)
@@ -1,5 +1,8 @@
 2008-01-29  Alan Mackenzie  <acm@muc.de>
 
+       * progmodes/cc-langs.el (c-specifier-key): Exclude "template"
+       from this regexp; part of same fix as next change to cc-engine.el.
+
        * progmodes/cc-engine.el (c-guess-basic-syntax, CASE 5A.5): Anchor
        the "{" of a template function correctly on "template", not the
        following "<".
index ea527730620bb65ab0b40d1de27a69ccdac30e45..54725c0fd886c5a7785d94d9c5a2725c5414d24c 100644 (file)
@@ -1771,11 +1771,13 @@ one of `c-type-list-kwds', `c-ref-list-kwds',
 (c-lang-defvar c-prefix-spec-kwds-re (c-lang-const c-prefix-spec-kwds-re))
 
 (c-lang-defconst c-specifier-key
-  ;; Adorned regexp of the keywords in `c-prefix-spec-kwds' that
-  ;; aren't ambiguous with types or type prefixes.
+  ;; Adorned regexp of the keywords in `c-prefix-spec-kwds' that aren't
+  ;; ambiguous with types or type prefixes.  These are the keywords (like
+  ;; extern, namespace, but NOT template) that can modify a declaration.
   t (c-make-keywords-re t
       (set-difference (c-lang-const c-prefix-spec-kwds)
-                     (c-lang-const c-type-start-kwds)
+                     (append (c-lang-const c-type-start-kwds)
+                             (c-lang-const c-<>-arglist-kwds))
                      :test 'string-equal)))
 (c-lang-defvar c-specifier-key (c-lang-const c-specifier-key))