[Top][All Lists]

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

Re: xref-find-matches and stuff

From: Eli Zaretskii
Subject: Re: xref-find-matches and stuff
Date: Wed, 13 May 2015 20:28:17 +0300

> Date: Wed, 13 May 2015 09:33:18 +0200
> From: martin rudalics <address@hidden>
> CC: address@hidden, address@hidden
> 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?

It depends on what you mean by "proceed".  I understand that you want
to see the corresponding DEFVAR_* line, is that right?

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

It's not a Lisp variable.  It's a C variable that has a Lisp binding.

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

Your wish has been granted in commit 8d69f38.

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

It will now offer both.  (I don't think I agree with that "never"
part, because it is important, and exactly what the user wants, in
some use cases, although evidently not in yours.)

reply via email to

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