Subject: Re: bug#72787: 31.0.50; Invalid describe-function completion candidates

From: Stefan Monnier <[email-masked]>
Date: Sat, 12 Oct 2024 20:47:35 -0400

> In summary, I see a void variable in the list of completions where the
> function is defined.

Right, indeed this mechanism doesn't distinguish between variables and
functions.  It is intended for real namespace prefixes and presumes
these will be populated by both vars and funs, and that fails with
packages that don't obey the usual namespace prefixing rules.

We should make this mechanism more strict in this respect.
I see in `dash-autoloads.el` we end up using:

    (register-definition-prefixes "dash" '("!cdr" "!cons" "--" "->" "-a" "-butlast" "-c" "-d" "-e" "-f" "-gr" "-i" "-juxt" "-keep" "-l" "-m" "-no" "-o" "-p" "-r" "-s" "-t" "-u" "-value-to-list" "-when-let" "-zip" "dash-"))

It would be better to bail if our guessed set of prefixes is too large,
since it's usually a sign that our heuristic just failed, as here.

> Also, when I do 'emacs -Q' followed directly with
> 'C-h f TAB', I see this:
>
> The (setf ...) part doesn't look right to me.

These look correct to me, they're setter functions.

        Stefan