aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2008-01-29 20:33:38 +0000
committerAlan Mackenzie2008-01-29 20:33:38 +0000
commit88b4a959ac74ff2518b44a4586b369eb01b9d2c5 (patch)
tree1c5eaf3276c38b09cf6ad961725936fc35df7867
parent86f4a763d44cb450fa2f32bd8443680ae412a70f (diff)
downloademacs-88b4a959ac74ff2518b44a4586b369eb01b9d2c5.tar.gz
emacs-88b4a959ac74ff2518b44a4586b369eb01b9d2c5.zip
(c-specifier-key): Exclude "template" from this regexp; to allow the "{"
of a template function to be correctly anchored on "template", not the following "<".
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/progmodes/cc-langs.el8
2 files changed, 8 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b6916f18d09..c089bb61f5e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12008-01-29 Alan Mackenzie <acm@muc.de> 12008-01-29 Alan Mackenzie <acm@muc.de>
2 2
3 * progmodes/cc-langs.el (c-specifier-key): Exclude "template"
4 from this regexp; part of same fix as next change to cc-engine.el.
5
3 * progmodes/cc-engine.el (c-guess-basic-syntax, CASE 5A.5): Anchor 6 * progmodes/cc-engine.el (c-guess-basic-syntax, CASE 5A.5): Anchor
4 the "{" of a template function correctly on "template", not the 7 the "{" of a template function correctly on "template", not the
5 following "<". 8 following "<".
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index ea527730620..54725c0fd88 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -1771,11 +1771,13 @@ one of `c-type-list-kwds', `c-ref-list-kwds',
1771(c-lang-defvar c-prefix-spec-kwds-re (c-lang-const c-prefix-spec-kwds-re)) 1771(c-lang-defvar c-prefix-spec-kwds-re (c-lang-const c-prefix-spec-kwds-re))
1772 1772
1773(c-lang-defconst c-specifier-key 1773(c-lang-defconst c-specifier-key
1774 ;; Adorned regexp of the keywords in `c-prefix-spec-kwds' that 1774 ;; Adorned regexp of the keywords in `c-prefix-spec-kwds' that aren't
1775 ;; aren't ambiguous with types or type prefixes. 1775 ;; ambiguous with types or type prefixes. These are the keywords (like
1776 ;; extern, namespace, but NOT template) that can modify a declaration.
1776 t (c-make-keywords-re t 1777 t (c-make-keywords-re t
1777 (set-difference (c-lang-const c-prefix-spec-kwds) 1778 (set-difference (c-lang-const c-prefix-spec-kwds)
1778 (c-lang-const c-type-start-kwds) 1779 (append (c-lang-const c-type-start-kwds)
1780 (c-lang-const c-<>-arglist-kwds))
1779 :test 'string-equal))) 1781 :test 'string-equal)))
1780(c-lang-defvar c-specifier-key (c-lang-const c-specifier-key)) 1782(c-lang-defvar c-specifier-key (c-lang-const c-specifier-key))
1781 1783