# HG changeset patch # User Glenn Morris # Date 1192585009 0 # Node ID 08501d097e3c1ac562eff9142031fe19acf3c091 # Parent 72683537bada41764146c9952daffdf27a4a84c7 (cc-imenu-c++-generic-expression): Tweak regexp to avoid overflow. diff -r 72683537bada -r 08501d097e3c lisp/progmodes/cc-menus.el --- a/lisp/progmodes/cc-menus.el Wed Oct 17 01:32:19 2007 +0000 +++ b/lisp/progmodes/cc-menus.el Wed Oct 17 01:36:49 2007 +0000 @@ -106,7 +106,9 @@ (nil ,(concat "^\\<" ; line MUST start with word char - "[^()]*" ; no parentheses before + ;; \n added to prevent overflow in regexp matcher. + ;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-02/msg00021.html + "[^()\n]*" ; no parentheses before "[^" c-alnum "_:<>~]" ; match any non-identifier char "\\([" c-alpha "_][" c-alnum "_:<>~]*\\)" ; match function name "\\([ \t\n]\\|\\\\\n\\)*(" ; see above, BUT the arg list