# HG changeset patch # User Alan Mackenzie # Date 1287521142 0 # Node ID b5730f66fbf431ec7f1efb00fe8b56f0aea3ea6d # Parent 09ec9197bd83571d4f5554c6d6428e4bd7856c6b cc-langs.el (c-type-decl-prefix-key): C++ bit: move "\(const\|throw\|volatile\)\>" nearer the start of the regexp, so that these keywords aren't wrongly matched as identifiers. diff -r 09ec9197bd83 -r b5730f66fbf4 lisp/ChangeLog --- a/lisp/ChangeLog Tue Oct 19 20:18:35 2010 +0000 +++ b/lisp/ChangeLog Tue Oct 19 20:45:42 2010 +0000 @@ -1,5 +1,9 @@ 2010-10-19 Alan Mackenzie + * progmodes/cc-langs.el (c-type-decl-prefix-key): C++ bit: move + "\(const\|throw\|volatile\)\>" nearer the start of the regexp, so + that these keywords aren't wrongly matched as identifiers. + * progmodes/cc-mode.el (c-before-change, c-after-change): Move the setting of c-new-BEG and c-new-END from c-before-change to c-after-change. diff -r 09ec9197bd83 -r b5730f66fbf4 lisp/progmodes/cc-langs.el --- a/lisp/progmodes/cc-langs.el Tue Oct 19 20:18:35 2010 +0000 +++ b/lisp/progmodes/cc-langs.el Tue Oct 19 20:45:42 2010 +0000 @@ -2676,15 +2676,15 @@ c++ (concat "\\(" "[*\(&]" "\\|" - (concat "\\(" ; 2 + (c-lang-const c-type-decl-prefix-key) + "\\|" + (concat "\\(" ; 3 ;; If this matches there's special treatment in ;; `c-font-lock-declarators' and ;; `c-font-lock-declarations' that check for a ;; complete name followed by ":: *". (c-lang-const c-identifier-start) "\\)") - "\\|" - (c-lang-const c-type-decl-prefix-key) "\\)" "\\([^=]\\|$\\)") pike "\\(\\*\\)\\([^=]\\|$\\)")