emacs-devel
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]