|
From: | Juri Linkov |
Subject: | Re: Question about completion behavior |
Date: | Sun, 13 Mar 2022 19:44:49 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) |
>> Maybe better to have the whole string with all text properties >> as the default value of 'completion-header-text-property-list' >> that then could be renamed to e.g. 'completion-header-string'? >> > I don't know a simple way for creating a string with the properties in a > single call. We may need a sort of wrapper function that initializes > the string and call set properties in a single call otherwise the user > may need to do it manually... Something like: > > (defun make-text-with-properties (string properties) > (let ((out string)) > (set-text-properties ...) > out)) > > Any better idea? Something like (defvar completion-header-format (propertize "%s possible completions:" 'face 'shadow :help "Please select a completion") "Format of completion header.") > The other detail is that there are 2 strings: "Possible completions are" > and "There are no possible completions of what you have typed." In case of no completions it will be formatted to: "0 possible completions". >> Regarding 'completion-lazy-count': it would be even better to allow >> customization of this format like in 'icomplete-matches-format' >> that was recently added in 28.1. >> > Probably the best is to join the two variables in > completion-header-string and allow it to have a %s for a count... I will > go in that way. > > Is it OK? It's OK, like above.
[Prev in Thread] | Current Thread | [Next in Thread] |