Subject: bug#74362: 31.0.50; Add completions for font names

From: Eli Zaretskii <[email-masked]>
Date: Fri, 15 Nov 2024 14:24:34 +0200

> Cc: [email-masked]
> Date: Thu, 14 Nov 2024 17:48:54 -0500
> From:  Stefan Monnier via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> In the UI of `customize-face`, the font family name is the main one that
> provides no help to fill it.
> The simple patch below provides completion (I had to put the completion
> function in `cus-edit.el` because of a circularity between
> `cus-face.el` and `minibuffer.el` so we can't call
> `completion-table-dynamic` while loading `cus-face.el`).
> 
> Comments/objections?

I suggest to try this on a system that has a lot of fonts installed,
to make sure this doesn't slow down customize-face too much.  In
bug#74337 a user reported that font-family-list returned a list of no
fewer than 10775(!) families.  I wonder what will that do to this
command.

Also, the doc string of customize-face should be amended to say that
it offers completion on fonts.

Btw, how does one invoke completion on the face attributes which are
supposed to provide one, such as weight or colors?  M-C-i doesn't seem
to do it for me, or what am I missing?