Hi,
That expression is supposed to match anything ending w/ some common C
extension, like .h, or a file with no extension, such as the stuff in
/usr/include for C++.
I think the delema is that the undecorated word part:
\<\w+$
which is supposed to match the end of:
/my/path/foo
will match the "c" part of
/my/path/foo.c
too.
I didn't write it as "/\w+$ since the / is not guaranteed as a file name
separator, but perhaps it should be like that anyway.
You can override header-match-regexp in your own instance of
ede-cpp-root to try and find a better regexp. If you get one, let us
know and we can patch the expression.
Eric
On 07/28/2011 09:35 PM, Giuseppe Scelsi wrote:
> Hi,
>
> I have been using ecb/cedet for a while but never got it to work to the
> degree I wanted, so I decided to have a look at how it all works,
> starting from EDE. Trying to figure out the "cpp-root" project type, I
> tried to call the 'ede-cpp-root-header-file-p' method and found that it
> always returns non-nil, no matter what string I pass to it. Does this
> make sense? In fact the last chunk of the 'header-match-regexp' regular
> expression in 'cpp-root.el' seems to match almost anything:
>
> "\\.\\(h\\(h\\|xx\\|pp\\|\\+\\+\\)?\\|H\\)$\\|\\<\\w+$"
>
> I am using emacs 23.2.1 in Ubuntu 11.04. Am I missing something here?
>
> Best regards,
>
> Giuseppe
>
> --
> Giuseppe B. Scelsi (giuseppe.scelsi@...)
>
>
> ------------------------------------------------------------------------------
> Got Input? Slashdot Needs You.
> Take our quick survey online. Come on, we don't ask for help often.
> Plus, you'll get a chance to win $100 to spend on ThinkGeek.
> http://p.sf.net/sfu/slashdot-survey
> _______________________________________________
> cedet-semantic mailing list
> cedet-semantic@...
> https://lists.sourceforge.net/lists/listinfo/cedet-semantic
>
|