>>> This will do it:
>> 
>>> (goto-char (point-max))
>>> (re-search-backward "^\\<[^()]*[^[:alnum:]_:<>~]")
>> 
>>> It matches the whole of etc/splash.xpm from "static char..." right
>>> through to the end, some 60000 odd characters later.
>> 
>> Good, thanks.  Then now we have to find someone who knows what the regexp is
>> supposed to match, so as to figure out how to rewrite it.

> progmodes/cc-menus.el:

> (defvar cc-imenu-c++-generic-expression
>         ...

>     ;; General function name regexp
>     (nil
>      ,(concat
>        "^\\<"                                 ; line MUST start with word char
>        "[^()]*"                               ; 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
>        "\\([ \t\n]\\|\\\\\n\\)*\\([^ \t\n(*][^)]*\\)?)" ; must not start
>        "\\([ \t\n]\\|\\\\\n\\)*[^ \t\n;(]"    ; with an asterisk or 
> parentheses
>        ) 1)

Yes, I saw that, but it's still not clear to me what's going on here.
E.g. the "match any non-identifier char" can match a parenthesis, is
that correct?

I guess a quick fix is to replace [^()] by [^()\n].


        Stefan


_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to