Subject: bug#78489: 30.1.50; Using etags, Ada and xref-find-definitions doesn't find definitions

From: Eli Zaretskii <[email-masked]>
Date: Sun, 01 Jun 2025 08:15:11 +0300

> From: Stefan Monnier <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Sat, 31 May 2025 14:26:57 -0400
> 
> > My problem is how to do this in a way that only affects "M-x
> > completion-at-point", but doesn't affect completion of tags in M-. or
> > other scenarios.  Can you suggest how to use the above so as to not
> > affret anything except completion-at-point?
> 
> To the extend that `M-.` could decide to use `completion-at-point`, I'm
> not sure this is possible in general, but maybe a patch like the one below
> can work well enough in practice?

Seems to do the job, thanks.  Maybe Troy could try this for a while
and report back.

Btw, maybe I don't understand what 'finished' means in the documentation
of :exit-function, but it's somewhat confusing:

                    ‘finished’ if text is now complete, ‘sole’ if the
          text cannot be further completed but completion is not
          finished, or ‘exact’ if the text is a valid completion but may
          be further completed.

This is confusing because the terms "text is complete", "cannot be
further completed", "may be further completed", and "valid completion"
are not explained, and the words themselves don't do that clearly
enough (except, perhaps, in the "valid completion" case).

What we want here is to "edit" the completion before it is passed to
the function that inserts it into the buffer.  The description of
:exit-function doesn't make it clear at what point in the completion
process will the function be called -- is that only when the user
"exits the completion", i.e. under the same conditions that
minibuffer-exit-hook is called (when completing in the minibuffer)?