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: Sat, 06 Mar 2021 20:28:09 +0200

> From: Stefan Kangas <stefan@marxist.se>
> Date: Sat, 6 Mar 2021 11:32:45 -0600
> Cc: larsi@gnus.org, emacs-devel@gnu.org
> 
> > OK, we can add a note to that effect to the `help-key-binding'
> > docstring.
> 
> Here's an updated patch.  The changes from the previous patch are all in
> the definition of the `help-key-binding' face.
> 
> Let me know if there is anything else to change before this can go in.

Thanks, I see only minor nits, this can go in once they are taken care
of.

> +*** Keybindings in 'help-mode' use the new `help-key-binding' face.

I think this should mention substitute-command-keys, and say that any
text that is run through that function will be propertized.  I'd also
mention the effect on tooltips there.

> +(defface help-key-binding
> +  '((((class color) (min-colors 88)) :foreground "ForestGreen")
> +    (((class color) (min-colors 16)) :foreground "green")
> +    (((class color) (min-colors 8)) :foreground "green")

The last 2 lines are unnecessary: the TTY color translation will do
that automatically.

> --- a/lisp/help.el
> +++ b/lisp/help.el
> @@ -104,8 +104,8 @@ help-map
>      (define-key map "R" 'info-display-manual)
>      (define-key map "s" 'describe-syntax)
>      (define-key map "t" 'help-with-tutorial)
> -    (define-key map "w" 'where-is)
>      (define-key map "v" 'describe-variable)
> +    (define-key map "w" 'where-is)
>      (define-key map "q" 'help-quit)

Why the change in the order?

>                        ;; Function is not on any key.
> -                      (progn (insert "M-x ")
> -                             (goto-char (+ end-point 3))
> -                             (delete-char 1))
> +                      (progn
> +                        (insert (propertize "M-x "
> +                                            'face 'help-key-binding
> +                                            'font-lock-face 
> 'help-key-binding))

Why are we fontifying "M-x" here?



reply via email to

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