aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2010-10-19 20:45:42 +0000
committerAlan Mackenzie2010-10-19 20:45:42 +0000
commit7f0789c9db1b26329e22157479d449d29ea50d34 (patch)
treef712c2fb768bc80c7ce2bdc4e7d153823d7203ab
parentba7fdf303b53766521c86dffb2cafb8d80f91bdb (diff)
downloademacs-7f0789c9db1b26329e22157479d449d29ea50d34.tar.gz
emacs-7f0789c9db1b26329e22157479d449d29ea50d34.zip
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.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/progmodes/cc-langs.el6
2 files changed, 7 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4aa0ead72b4..58d7841dfd8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
12010-10-19 Alan Mackenzie <acm@muc.de> 12010-10-19 Alan Mackenzie <acm@muc.de>
2 2
3 * progmodes/cc-langs.el (c-type-decl-prefix-key): C++ bit: move
4 "\(const\|throw\|volatile\)\>" nearer the start of the regexp, so
5 that these keywords aren't wrongly matched as identifiers.
6
3 * progmodes/cc-mode.el (c-before-change, c-after-change): Move the 7 * progmodes/cc-mode.el (c-before-change, c-after-change): Move the
4 setting of c-new-BEG and c-new-END from c-before-change to 8 setting of c-new-BEG and c-new-END from c-before-change to
5 c-after-change. 9 c-after-change.
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index ba056133651..ad6b6787652 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -2676,15 +2676,15 @@ Identifier syntax is in effect when this is matched \(see
2676 c++ (concat "\\(" 2676 c++ (concat "\\("
2677 "[*\(&]" 2677 "[*\(&]"
2678 "\\|" 2678 "\\|"
2679 (concat "\\(" ; 2 2679 (c-lang-const c-type-decl-prefix-key)
2680 "\\|"
2681 (concat "\\(" ; 3
2680 ;; If this matches there's special treatment in 2682 ;; If this matches there's special treatment in
2681 ;; `c-font-lock-declarators' and 2683 ;; `c-font-lock-declarators' and
2682 ;; `c-font-lock-declarations' that check for a 2684 ;; `c-font-lock-declarations' that check for a
2683 ;; complete name followed by ":: *". 2685 ;; complete name followed by ":: *".
2684 (c-lang-const c-identifier-start) 2686 (c-lang-const c-identifier-start)
2685 "\\)") 2687 "\\)")
2686 "\\|"
2687 (c-lang-const c-type-decl-prefix-key)
2688 "\\)" 2688 "\\)"
2689 "\\([^=]\\|$\\)") 2689 "\\([^=]\\|$\\)")
2690 pike "\\(\\*\\)\\([^=]\\|$\\)") 2690 pike "\\(\\*\\)\\([^=]\\|$\\)")