From: Tassilo Horn <tsdh@gnu.org>
To: Glen Stark <mail@glenstark.net>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Search within function for text
Date: Tue, 24 Mar 2015 16:44:29 +0100 [thread overview]
Message-ID: <87zj72763m.fsf@gnu.org> (raw)
In-Reply-To: <QDdQw.393363$pU1.53944@fx24.am4> (Glen Stark's message of "Tue, 24 Mar 2015 13:28:16 GMT")
Glen Stark <mail@glenstark.net> 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
next prev parent reply other threads:[~2015-03-24 15:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-24 13:28 Search within function for text Glen Stark
2015-03-24 15:21 ` Drew Adams
2015-03-24 15:44 ` Tassilo Horn [this message]
2015-03-24 16:53 ` Louis Höfler
2015-03-24 16:57 ` Louis Höfler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zj72763m.fsf@gnu.org \
--to=tsdh@gnu.org \
--cc=help-gnu-emacs@gnu.org \
--cc=mail@glenstark.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).