diff lisp/cc-mode/cc-langs.el @ 175:2d532a89d707 r20-3b14

Import from CVS: tag r20-3b14
author cvs
date Mon, 13 Aug 2007 09:50:14 +0200
parents 929b76928fce
children 6075d714658b
line wrap: on
line diff
--- a/lisp/cc-mode/cc-langs.el	Mon Aug 13 09:49:11 2007 +0200
+++ b/lisp/cc-mode/cc-langs.el	Mon Aug 13 09:50:14 2007 +0200
@@ -7,7 +7,7 @@
 ;;             1985 Richard M. Stallman
 ;; Maintainer: cc-mode-help@python.org
 ;; Created:    22-Apr-1997 (split from cc-mode.el)
-;; Version:    5.12
+;; Version:    5.13
 ;; Keywords:   c languages oop
 
 ;; This file is part of GNU Emacs.
@@ -27,6 +27,8 @@
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+(require 'cc-defs)
+
 
 ;; Regular expressions and other values which must be parameterized on
 ;; a per-language basis.
@@ -34,11 +36,18 @@
 ;; Keywords defining protection levels
 (defconst c-protection-key "\\<\\(public\\|protected\\|private\\)\\>")
 
-;; Regex describing a `symbol' in all languages We cannot use just
+;; Regex describing a `symbol' in all languages.  We cannot use just
 ;; `word' syntax class since `_' cannot be in word class.  Putting
 ;; underscore in word class breaks forward word movement behavior that
-;; users are familiar with.
-(defconst c-symbol-key "\\(\\w\\|\\s_\\)+")
+;; users are familiar with.  Besides, this runs counter to Emacs
+;; convention.
+;;
+;; I suspect this definition isn't correct in light of Java's
+;; definition of a symbol as being Unicode.  I know so little about
+;; I18N (except how to sound cool and say I18N :-) that I'm willing to
+;; punt on this for now.
+
+(defconst c-symbol-key "[_a-zA-Z]\\(\\w\\|\\s_\\)*")
 
 
 ;; keywords introducing class definitions.  language specific
@@ -271,7 +280,7 @@
 
 
 ;; Common routines
-(defsubst c-make-inherited-keymap ()
+(defun c-make-inherited-keymap ()
   (let ((map (make-sparse-keymap)))
     (cond
      ;; XEmacs 19 & 20
@@ -395,17 +404,22 @@
 (defun c-mode-menu (modestr)
   (let ((m
 	 '(["Comment Out Region"     comment-region (mark)]
-	   ["Macro Expand Region"    c-macro-expand (mark)]
-	   ["Backslashify"           c-backslash-region (mark)]
+	   ["Uncomment Region"
+	    (comment-region (region-beginning) (region-end) '(4))
+	    (mark)]
+	   ["Fill Comment Paragraph" c-fill-paragraph t]
+	   "---"
 	   ["Indent Expression"      c-indent-exp
 	    (memq (char-after) '(?\( ?\[ ?\{))]
 	   ["Indent Line"            c-indent-command t]
-	   ["Fill Comment Paragraph" c-fill-paragraph t]
 	   ["Up Conditional"         c-up-conditional t]
 	   ["Backward Conditional"   c-backward-conditional t]
 	   ["Forward Conditional"    c-forward-conditional t]
 	   ["Backward Statement"     c-beginning-of-statement t]
 	   ["Forward Statement"      c-end-of-statement t]
+	   "---"
+	   ["Macro Expand Region"    c-macro-expand (mark)]
+	   ["Backslashify"           c-backslash-region (mark)]
 	   )))
     (cons modestr m)))