|
From: | Clemens |
Subject: | bug#45780: 28.0.50; [PATCH] Face used for affixation function annotations |
Date: | Thu, 14 Jan 2021 18:21:00 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
Do you want to use the completion-annotations face conditionally only for annotations, i.e. when only the suffix is provided by the client? Because when a prefix is provided as well, then it's not an annotation anymore, so the completion-annotations face is not applicable to prefixes.
I see, personally I think of all strings besides the completions themselves as annotations ;) Makes sense to do it only for the suffix then.
Doing this is not something new, we already have the same logic in minibuffer-message: (unless (or (null minibuffer-message-properties) ;; Don't overwrite the face properties the caller has set (text-properties-at 0 message)) (setq message (apply #'propertize message minibuffer-message-properties))) Is this logic suitable for completion-annotations?
I guess this could also be used, the version I posted earlier only checks for the face property and then also check the whole string:
(if (text-property-not-all 0 (length str) 'face nil str) str (propertize str 'face face)) When only the face matters my proposed version might be better?
[Prev in Thread] | Current Thread | [Next in Thread] |