summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cc-menus.el
diff options
context:
space:
mode:
authorBarry A. Warsaw <barry@zope.org>1999-02-08 16:53:18 +0000
committerBarry A. Warsaw <barry@zope.org>1999-02-08 16:53:18 +0000
commitddca225854b222f6a1bba28acc2c8c387729eb1e (patch)
treedcf857ff89e8806ca9a607e21b9667b9337548fd /lisp/progmodes/cc-menus.el
parent587f2e9673d95e3233c929af46aec40915e4abb0 (diff)
downloademacs-ddca225854b222f6a1bba28acc2c8c387729eb1e.tar.gz
Installed CC Mode 5.25.Release_5_25
Diffstat (limited to 'lisp/progmodes/cc-menus.el')
-rw-r--r--lisp/progmodes/cc-menus.el28
1 files changed, 20 insertions, 8 deletions
diff --git a/lisp/progmodes/cc-menus.el b/lisp/progmodes/cc-menus.el
index 7fbe653b6a2..87bd4ed6def 100644
--- a/lisp/progmodes/cc-menus.el
+++ b/lisp/progmodes/cc-menus.el
@@ -2,10 +2,11 @@
;; Copyright (C) 1985,87,92,93,94,95,96,97,98 Free Software Foundation, Inc.
-;; Authors: 1992-1997 Barry A. Warsaw
+;; Authors: 1998 Barry A. Warsaw and Martin Stjernholm
+;; 1992-1997 Barry A. Warsaw
;; 1987 Dave Detlefs and Stewart Clamen
;; 1985 Richard M. Stallman
-;; Maintainer: cc-mode-help@python.org
+;; Maintainer: bug-cc-mode@gnu.org
;; Created: 22-Apr-1997 (split from cc-mode.el)
;; Version: See cc-mode.el
;; Keywords: c languages oop
@@ -27,10 +28,14 @@
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
+;; Pull in Imenu when compiling, if it exists
+(eval-when-compile
+ (condition-case nil
+ (require 'imenu)
+ (error nil)))
+
;; imenu integration
-(eval-when-compile (require 'imenu))
-
(defvar cc-imenu-c-prototype-macro-regexp nil
"RE matching macro names used to conditionally specify function prototypes.
@@ -117,7 +122,10 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.")
"^" ; beginning of line is required
"\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a `template <...>'
"class[ \t]+"
- "\\([a-zA-Z0-9_]+\\)" ; the string we want to get
+ "\\(" ; the string we want to get
+ "[a-zA-Z0-9_]+" ; class name
+ "\\(<[^>]+>\\)?" ; possibly explicitely specialized
+ "\\)"
"[ \t]*[:{]"
)) 2)))
"Imenu generic expression for C++ mode. See `imenu-generic-expression'.")
@@ -137,8 +145,8 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.")
"\\([A-Za-z0-9_-]+[ \t]*[[]?[]]?\\)"
"\\([ \t]\\)"
"\\([A-Za-z0-9_-]+\\)" ; the string we want to get
- "\\([ \t]*\\)("
- "\\([][a-zA-Z,_1-9\n \t]*\\)" ; arguments
+ "\\([ \t]*\\)+("
+ "\\([a-zA-Z,_1-9\n \t]*[[]?[]]?\\)*" ; arguments
")[ \t]*"
; "[^;(]"
"[,a-zA-Z_1-9\n \t]*{"
@@ -307,7 +315,7 @@ Example:
(if (fboundp 'buffer-substring-no-properties)
'buffer-substring-no-properties
'buffer-substring)))
- (goto-char (point-max))
+ (goto-char (point-max))
(imenu-progress-message stupid 0)
;;
(while (re-search-backward cc-imenu-objc-generic-expression nil t)
@@ -386,6 +394,10 @@ Example:
toplist
))
+;(defvar cc-imenu-pike-generic-expression
+; ())
+; FIXME: Please contribute one!
+
(provide 'cc-menus)
;;; cc-menus.el ends here