Mercurial > emacs
changeset 111053:b5730f66fbf4
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.
author | Alan Mackenzie <acm@muc.de> |
---|---|
date | Tue, 19 Oct 2010 20:45:42 +0000 |
parents | 09ec9197bd83 |
children | 779cd575396a |
files | lisp/ChangeLog lisp/progmodes/cc-langs.el |
diffstat | 2 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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 <acm@muc.de> + * 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.
--- 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 "\\(\\*\\)\\([^=]\\|$\\)")