]> git.eshelyaron.com Git - emacs.git/commitdiff
cc-langs.el (c-type-decl-prefix-key): C++ bit: move
authorAlan Mackenzie <acm@muc.de>
Tue, 19 Oct 2010 20:45:42 +0000 (20:45 +0000)
committerAlan Mackenzie <acm@muc.de>
Tue, 19 Oct 2010 20:45:42 +0000 (20:45 +0000)
"\(const\|throw\|volatile\)\>" nearer the start of the regexp, so that
these keywords aren't wrongly matched as identifiers.

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

index 4aa0ead72b42cce4b82d46ace1d2a60da18044ab..58d7841dfd867cd8631a2649d56b71eb94d896c9 100644 (file)
@@ -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.
index ba0561336519ba67d8900cb2c6ca2e894d448247..ad6b6787652426e42d6bb8628ef69cc0a50396da 100644 (file)
@@ -2676,15 +2676,15 @@ Identifier syntax is in effect when this is matched \(see
   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 "\\(\\*\\)\\([^=]\\|$\\)")