# HG changeset patch # User Glenn Morris # Date 1192584984 0 # Node ID 5a26fd1686ae07e9415f75bba6e9e38df80b788c # Parent 72e8c1dc7591b891fdea4924e78abe5288d384e9 (cc-imenu-c++-generic-expression): Tweak regexp to avoid overflow. diff -r 72e8c1dc7591 -r 5a26fd1686ae lisp/progmodes/cc-menus.el --- a/lisp/progmodes/cc-menus.el Wed Oct 17 01:36:10 2007 +0000 +++ b/lisp/progmodes/cc-menus.el Wed Oct 17 01:36:24 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