help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Search within function for text


From: Tassilo Horn
Subject: Re: Search within function for text
Date: Tue, 24 Mar 2015 16:44:29 +0100
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

Glen Stark <address@hidden> writes:

Hi Glen,

> I would like to find all occurences of a bit of text that fall within
> a certain function name.  I'm programming in C++, and several classes
> have their own implementations of foo(), and I'd like to find all
> occurrences of the string "bar" within functions named "foo()".

At least you can't do that with regular expressions but you need to
something which actually understands C++ syntax.

> Does anyone know of a way I can do this?

Have a look at CEDET.  Assuming foo is not just a string but a variable
or function, `semantic-symref' might do exactly what you want:

  http://cedet.sourceforge.net/symref.shtml

Bye,
Tassilo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]