emacs-devel
[Top][All Lists]
Advanced

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

Re: xref-find-matches and stuff


From: martin rudalics
Subject: Re: xref-find-matches and stuff
Date: Wed, 13 May 2015 09:33:18 +0200

> You mean, "make TAGS" doesn't run or doesn't create TAGS files in src/
> and in lisp/ ?  It does for me.

It runs and creates the TAGS files.

>> When I am in frame.c with point on the first item of the line reading
>>
>>    Vmake_pointer_invisible = Qt;
>>
>> and I type M-. Emacs opens the file globals.h and moves there to the
>> line reading
>>
>> #define Vmake_pointer_invisible globals.f_Vmake_pointer_invisible
>>
>> which is the only entry in the TAGS file containing
>> Vmake_pointer_invisible.  So what am _I_ missing?
>
> I'm not sure.  Are we still talking about support for DEFVAR_LISP
> etc.?  If so, perhaps you need to say
>
>    C-u M-. make-pointer-invisible RET
>
> ?

I'll try to give a more meaningful example.  Suppose I'm on line 4818 of
w32term.c and want to know what focus_follows_mouse is and where it is
defined.  Typing M-. there prompts me with something like

.../globals.h
  #define focus_follows_mouse
    bool f_focus_follows_mouse;

How am I supposed to proceed from here?

> IOW, when etags finds those DEF* declarations in C files, it tags the
> Lisp symbol name, not the C symbol name.

But I'm in a C file and may not have any a priori knowledge that
focus_follows_mouse is a Lisp variable.

> See the regular expressions
> we pass to etags: they instruct etags to take the first token that
> matches "[^"]+" after an opening parenthesis.  If we want to tag the C
> symbol, we need to add another regexp for that.

That's precisely what I wanted.

> Other than that, I see no problems in what you get from M-. because
> Vmake_pointer_invisible is indeed a C macro defined on that line of
> globals.h.  What did you expect to get instead?

That it goes to the definition of Vmake_pointer_invisible in frame.c
(and never to that in globals.h).

martin



reply via email to

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