emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r106281: Add c-nonlabel-token-2-key t


From: Alan Mackenzie
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106281: Add c-nonlabel-token-2-key to cc-langs.el.
Date: Thu, 03 Nov 2011 22:14:11 +0000
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106281 [merge]
committer: Alan Mackenzie <address@hidden>
branch nick: trunk
timestamp: Thu 2011-11-03 22:14:11 +0000
message:
  Add c-nonlabel-token-2-key to cc-langs.el.
modified:
  lisp/ChangeLog
  lisp/progmodes/cc-langs.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-11-02 12:56:48 +0000
+++ b/lisp/ChangeLog    2011-11-03 22:10:02 +0000
@@ -1,3 +1,8 @@
+2011-11-03  Alan Mackenzie  <address@hidden>
+
+       * progmodes/cc-langs.el (c-nonlabel-token-2-key): New variable for
+       change in cc-engine.el.
+
 2011-11-02  Stefan Monnier  <address@hidden>
 
        * window.el (switch-to-buffer): Use `force-same-window' interactively.
@@ -136,7 +141,6 @@
 
        * progmodes/cc-langs.el (c-defun-tactic): Move this variable to
        cc-vars.el.
-       (c-nonlabel-token-2-key): New variable for change in cc-engine.el.
 
        * progmodes/cc-engine.el (c-beginning-of-statement-1):
        Prevent "class foo : bar" being spuriously recognized as a label.

=== modified file 'lisp/progmodes/cc-langs.el'
--- a/lisp/progmodes/cc-langs.el        2011-10-27 20:34:23 +0000
+++ b/lisp/progmodes/cc-langs.el        2011-11-03 21:55:15 +0000
@@ -3012,6 +3012,14 @@
   c++ (concat "\\s\(\\|" (c-lang-const c-nonlabel-token-key)))
 (c-lang-defvar c-nonlabel-token-key (c-lang-const c-nonlabel-token-key))
 
+(c-lang-defconst c-nonlabel-token-2-key
+  "Regexp matching things that can't occur two symbols before a colon in
+a label construct.  This catches C++'s inheritance construct \"class foo
+: bar\".  Only used if `c-recognize-colon-labels' is set."
+  t "\\<\\>"                           ; matches nothing
+  c++ (c-make-keywords-re t '("class")))
+(c-lang-defvar c-nonlabel-token-2-key (c-lang-const c-nonlabel-token-2-key))
+
 (c-lang-defconst c-opt-extra-label-key
   "Optional regexp matching labels.
 Normally, labels are detected according to `c-nonlabel-token-key',


reply via email to

[Prev in Thread] Current Thread [Next in Thread]