Subject: Re: xfuncname problems with C++

From: Jonathan Nieder <[email-masked]>
Date: Fri, 2 Jan 2015 14:05:56 -0800

Robert Dailey wrote:

> The 'void' does not start on the leftmost column, due to tabbing there
> can be any number of whitespace (the regex should account for this).

Ah, that explains it.  The default C++ pattern assumes the 'void'
starts at the leftmost column, so that the funcname header represents
whatever top-level construct forms the context (e.g., "class foo {").

(Jump targets or access declarations)
!^[ \t]*[A-Za-z_][A-Za-z_0-9]*:[[:space:]]*($|/[/*])

(functions/methods, variables, and compounds at top level)
^((::[[:space:]]*)?[A-Za-z_].*)$

Thanks,
Jonathan