summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cc-menus.el
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2011-08-27 08:41:23 +0000
committerAlan Mackenzie <acm@muc.de>2011-08-27 08:41:23 +0000
commit3fc9b2184582296ffe4a602d87534f35ba4b4919 (patch)
tree9b29ff9c7b4bbde7c07ec8f0456c3497d31e41e0 /lisp/progmodes/cc-menus.el
parent538a061c725a191b921055c87cc0c26f0bccd95f (diff)
downloademacs-3fc9b2184582296ffe4a602d87534f35ba4b4919.tar.gz
progmodes/cc-menus.el (cc-imenu-c++-generic-expression): Make it handle
function pointer parameters properly.
Diffstat (limited to 'lisp/progmodes/cc-menus.el')
-rw-r--r--lisp/progmodes/cc-menus.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/progmodes/cc-menus.el b/lisp/progmodes/cc-menus.el
index f53a7da5186..4e9350de425 100644
--- a/lisp/progmodes/cc-menus.el
+++ b/lisp/progmodes/cc-menus.el
@@ -108,8 +108,11 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.")
"[^" c-alnum "_:<>~]" ; match any non-identifier char
"\\([" c-alpha "_][" c-alnum "_:<>~]*\\)" ; match function name
"\\([ \t\n]\\|\\\\\n\\)*(" ; see above, BUT the arg list
- "\\([ \t\n]\\|\\\\\n\\)*\\([^ \t\n(*][^)]*\\)?)" ; must not start
- "\\([ \t\n]\\|\\\\\n\\)*[^ \t\n;(]" ; with an asterisk or parentheses
+ "\\([ \t\n]\\|\\\\\n\\)*" ; must not start
+ "\\([^ \t\n(*]" ; with an asterisk or parentheses
+ "[^()]*\\(([^()]*)[^()]*\\)*" ; Maybe function pointer arguments
+ "\\)?)"
+ "\\([ \t\n]\\|\\\\\n\\)*[^ \t\n;(]"
) 1)
;; Special case for definitions using phony prototype macros like:
;; `int main _PROTO( (int argc,char *argv[]) )'.