[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Consistent face for keys in *Help* and `substitute-command-keys'
From: |
Eli Zaretskii |
Subject: |
Re: Consistent face for keys in *Help* and `substitute-command-keys' |
Date: |
Wed, 24 Feb 2021 18:51:00 +0200 |
> From: Stefan Kangas <stefan@marxist.se>
> Date: Tue, 23 Feb 2021 19:40:07 -0600
> Cc: emacs-devel@gnu.org
>
> --- a/src/keymap.c
> +++ b/src/keymap.c
> @@ -3021,7 +3021,10 @@ describe_vector (Lisp_Object vector, Lisp_Object
> prefix, Lisp_Object args,
> if (!NILP (elt_prefix))
> insert1 (elt_prefix);
>
> - insert1 (Fkey_description (kludge, prefix));
> + Lisp_Object desc = Fkey_description (kludge, prefix);
> + if (keymap_p)
> + desc = CALLN (Fpropertize, desc, Qfont_lock_face, Qhelp_key_binding);
> + insert1 (desc);
Using Fpropertize here is suboptimal: it does several thing you don't
need when calling it from C, including consing a new string, which is
just a waste of cycles.
Please use Fadd_text_properties instead.
- Re: Consistent face for keys in *Help* and `substitute-command-keys', (continued)
- Re: Consistent face for keys in *Help* and `substitute-command-keys', Stefan Kangas, 2021/02/24
- Re: Consistent face for keys in *Help* and `substitute-command-keys', Eli Zaretskii, 2021/02/25
- Re: Consistent face for keys in *Help* and `substitute-command-keys', Stefan Kangas, 2021/02/25
- Re: Consistent face for keys in *Help* and `substitute-command-keys', Eli Zaretskii, 2021/02/25
- Re: Consistent face for keys in *Help* and `substitute-command-keys', Stefan Kangas, 2021/02/25
- Re: Consistent face for keys in *Help* and `substitute-command-keys', Eli Zaretskii, 2021/02/25
- Re: Consistent face for keys in *Help* and `substitute-command-keys', Stefan Kangas, 2021/02/25
- Re: Consistent face for keys in *Help* and `substitute-command-keys', Eli Zaretskii, 2021/02/25
- RE: [External] : Re: Consistent face for keys in *Help* and `substitute-command-keys', Drew Adams, 2021/02/25
- Re: Consistent face for keys in *Help* and `substitute-command-keys', martin rudalics, 2021/02/25
- Re: Consistent face for keys in *Help* and `substitute-command-keys',
Eli Zaretskii <=
- Re: Consistent face for keys in *Help* and `substitute-command-keys', Stefan Kangas, 2021/02/24
- Re: Consistent face for keys in *Help* and `substitute-command-keys', Eli Zaretskii, 2021/02/25
Re: Proposal for an improved `help-for-help', Eli Zaretskii, 2021/02/21
- RE: [External] : Re: Proposal for an improved `help-for-help', Drew Adams, 2021/02/21
- Re: Proposal for an improved `help-for-help', Stefan Kangas, 2021/02/21
- Re: Proposal for an improved `help-for-help', Eli Zaretskii, 2021/02/21
- Re: Proposal for an improved `help-for-help', Stefan Kangas, 2021/02/21
- Re: Proposal for an improved `help-for-help', Eli Zaretskii, 2021/02/21
- Re: Proposal for an improved `help-for-help', Stefan Kangas, 2021/02/21
- Re: Proposal for an improved `help-for-help', Eli Zaretskii, 2021/02/22