aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/cc-langs.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1997-07-18 02:09:34 +0000
committerRichard M. Stallman <[email protected]>1997-07-18 02:09:34 +0000
commita6739a05e399008b8a0861376eacda5e3650ee06 (patch)
tree5ccd07d534762b1dedaab6f8dd6265869ec07b10 /lisp/progmodes/cc-langs.el
parent7543028ea0375c194aea1dadadcb286b571be4ab (diff)
Require 'cc-defs for the definition of c-emacs-features.
(c-symbol-key): First character must be a letter or underscore. (c-make-inherited-keymap): Change to a defun. (c-mode-menu): Added uncomment region and slight rearrangement of items.
Diffstat (limited to 'lisp/progmodes/cc-langs.el')
-rw-r--r--lisp/progmodes/cc-langs.el30
1 files changed, 22 insertions, 8 deletions
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index abfab2f2bf..c92118e76b 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -7,7 +7,7 @@
;; 1985 Richard M. Stallman
;; Maintainer: [email protected]
;; 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)
+
(require 'cc-defs)
@@ -36,11 +38,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
@@ -273,7 +282,7 @@ it finds in `c-file-offsets'."
;; Common routines
-(defsubst c-make-inherited-keymap ()
+(defun c-make-inherited-keymap ()
(let ((map (make-sparse-keymap)))
(cond
;; XEmacs 19 & 20
@@ -397,17 +406,22 @@ it finds in `c-file-offsets'."
(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)))