unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* how to find delaration of a variable
@ 2004-04-22 23:10 Lowell Kirsh
  2004-04-22 23:11 ` David Kastrup
  0 siblings, 1 reply; 4+ messages in thread
From: Lowell Kirsh @ 2004-04-22 23:10 UTC (permalink / raw)


Is there an elisp function similar to find-variable-at-point that would 
work for non-lisp code? I'd like to use it to jump to the declaration of 
whatever variable is at point.

Lowell

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: how to find delaration of a variable
  2004-04-22 23:10 how to find delaration of a variable Lowell Kirsh
@ 2004-04-22 23:11 ` David Kastrup
  2004-04-23  1:36   ` Lowell Kirsh
  0 siblings, 1 reply; 4+ messages in thread
From: David Kastrup @ 2004-04-22 23:11 UTC (permalink / raw)


Lowell Kirsh <lkirsh@cs.ubc.ca> writes:

> Is there an elisp function similar to find-variable-at-point that
> would work for non-lisp code? I'd like to use it to jump to the
> declaration of whatever variable is at point.

First run
etags *.c *.h

and then press M-. on the variable in question (specifying the local
TAGS file that etags generated, if you get asked for it).

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: how to find delaration of a variable
  2004-04-22 23:11 ` David Kastrup
@ 2004-04-23  1:36   ` Lowell Kirsh
  2004-04-24 21:17     ` Kai Grossjohann
  0 siblings, 1 reply; 4+ messages in thread
From: Lowell Kirsh @ 2004-04-23  1:36 UTC (permalink / raw)


thanks. it works well most of the time. I have one question though: 
sometimes it will take me to the declaration of the a variable of the 
same name but in a different file. Is there any way I can make sure it 
looks in the current file for the declaration before going to other file?

Lowell

David Kastrup wrote:
> Lowell Kirsh <lkirsh@cs.ubc.ca> writes:
> 
> 
>>Is there an elisp function similar to find-variable-at-point that
>>would work for non-lisp code? I'd like to use it to jump to the
>>declaration of whatever variable is at point.
> 
> 
> First run
> etags *.c *.h
> 
> and then press M-. on the variable in question (specifying the local
> TAGS file that etags generated, if you get asked for it).
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: how to find delaration of a variable
  2004-04-23  1:36   ` Lowell Kirsh
@ 2004-04-24 21:17     ` Kai Grossjohann
  0 siblings, 0 replies; 4+ messages in thread
From: Kai Grossjohann @ 2004-04-24 21:17 UTC (permalink / raw)


Lowell Kirsh <lkirsh@cs.ubc.ca> writes:

> thanks. it works well most of the time. I have one question though:
> sometimes it will take me to the declaration of the a variable of the
> same name but in a different file. Is there any way I can make sure it
> looks in the current file for the declaration before going to other
> file?

Dunno, but M-0 M-. will take you to the next occurrence.  Maybe that's
good enough?

You might also try M-x imenu RET.  It operates on the current file
only.

Kai

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-04-24 21:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-22 23:10 how to find delaration of a variable Lowell Kirsh
2004-04-22 23:11 ` David Kastrup
2004-04-23  1:36   ` Lowell Kirsh
2004-04-24 21:17     ` Kai Grossjohann

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