Stefan Monnier <[EMAIL PROTECTED]> writes:

>> 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)


-- 
Kim F. Storm <[EMAIL PROTECTED]> http://www.cua.dk



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

Reply via email to