[Top][All Lists]

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

bug#22692: docstring for xref-find-definitions

From: Dmitry Gutov
Subject: bug#22692: docstring for xref-find-definitions
Date: Fri, 19 Feb 2016 15:01:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0

On 02/18/2016 06:50 PM, Eli Zaretskii wrote:

Failing that, the only band-aid I can offer is something like

   Find the definition of the identifier at or near point.

If you think it's better, we can make that change now.

Do we really want to codify that behavior? I've switched to use find-tag--default because it seemed appropriate for the etags backend, but the "near point" aspect looks fairly awkward to me, and I imagine third-party backends might choose to omit it.

I'd prefer to use the more precise behavior in find-tag-default-bounds as well. And if there's general agreement here, I wouldn't mind taking care of that patch.

Also note how careful the find-tag-default is in avoiding prescribing the exact behavior.

Did you use M-. in Emacs 24 and before?  Because that's exactly what
it did in this case, it would say this in the echo area:

   Find tag (default 1):

The reason is that this is what etags.el does when asked to find "the
identifier at or near point".  Patches to make it smarter are welcome.
(The relevant function is find-tag-default-bounds.)

Not necessarily. Every major mode that knows better should define its own find-tag-default-function (but none do, so far). See the dispatch inside find-tag--default.

reply via email to

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