[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Simplification of `affixation-function`
From: |
Juri Linkov |
Subject: |
Re: Simplification of `affixation-function` |
Date: |
Wed, 28 Apr 2021 22:59:51 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
>> Then the caller e.g. help--symbol-completion-table could define whether
>> to append "u", "a" and "c" in parens by using on a candidate something like
>> (format "%s (%s)" cand (cond ((fboundp (intern cand)) "f")) ...),
>> or prepend a dimmed letter as a prefix, or to use an icon.
>
> Do you use Company? Take a look at what elisp--company-kind does.
>
> The fact that the space of allowed values is constrained makes the returned
> information really more useful.
>
> And here since you do not document which values (strings, characters, etc)
> the prefix returned by affixation-function can take, their usefulness is
> limited. The user can't be sure what "c" means: it's "command" here, but
> could be meant as "constant" by another affixation function. Is "m"
> a "macro" or "method"? "f" stands for "function" or "field"?
>
> And also because of that no completing-read UI can replace these characters
> with any alternative (e.g. graphical) representation.
I took a look at elisp--company-kind and see such code:
:annotation-function
(lambda (str) (if (fboundp (intern-soft str)) "
<f>"))
:company-kind #'elisp--company-kind
There are still hard-coded letters where "f" stands for "function".
- Re: Simplification of `affixation-function`, (continued)
- Re: Simplification of `affixation-function`, Dmitry Gutov, 2021/04/24
- Re: Simplification of `affixation-function`, Daniel Mendler, 2021/04/24
- Re: Simplification of `affixation-function`, Dmitry Gutov, 2021/04/25
- Re: Simplification of `affixation-function`, Daniel Mendler, 2021/04/25
- Re: Simplification of `affixation-function`, Dmitry Gutov, 2021/04/25
- Re: Simplification of `affixation-function`, Juri Linkov, 2021/04/27
- Re: Simplification of `affixation-function`, Daniel Mendler, 2021/04/27
- Re: Simplification of `affixation-function`, Juri Linkov, 2021/04/27
- Re: Simplification of `affixation-function`, Daniel Mendler, 2021/04/27
- Re: Simplification of `affixation-function`, Dmitry Gutov, 2021/04/27
- Re: Simplification of `affixation-function`,
Juri Linkov <=
- Re: Simplification of `affixation-function`, Dmitry Gutov, 2021/04/28