[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Consistent face for keys in *Help* and `substitute-command-keys'
From: |
Stefan Kangas |
Subject: |
Re: Consistent face for keys in *Help* and `substitute-command-keys' |
Date: |
Wed, 24 Feb 2021 10:35:47 -0600 |
"Basil L. Contovounesios" <contovob@tcd.ie> writes:
>> +(defface help-key-binding '((t :weight semi-bold :foreground "ForestGreen"))
>> + "Face for keybindings in *Help* buffers."
>> + :group 'help)
>
> Missing :version?
Fixed.
>> diff --git a/lisp/help-fns.el b/lisp/help-fns.el
>> index 7244695094..8277bbdad1 100644
>> --- a/lisp/help-fns.el
>> +++ b/lisp/help-fns.el
>> @@ -466,12 +466,15 @@ help-fns--key-bindings
>> ;; If lots of ordinary text characters run this command,
>> ;; don't mention them one by one.
>> (if (< (length non-modified-keys) 10)
>> - (princ (mapconcat #'key-description keys ", "))
>> + (with-current-buffer standard-output
>> + (insert (mapconcat #'help--key-description-fontified
>> + keys ", ")))
>
> Why is insert needed in place of princ here, but not below?
We do need `insert' here. Fixed.
>> (dolist (key non-modified-keys)
>> (setq keys (delq key keys)))
>> (if keys
>> (progn
>> - (princ (mapconcat #'key-description keys ", "))
>> + (princ (mapconcat #'help--key-description-fontified
>> + keys ", "))
>
> [...]
>
>> + (replace-match (propertize
>> + (key-description
>> + (substring (this-command-keys) 0 -1))
>> + 'font-lock-face 'help-key-binding
>> + 'face 'help-key-binding)
>
> Why not use help--key-description-fontified here?
Using it would introduce a circular dependency between help-macro.el and
help.el.
Thanks for your comments.
- Re: Proposal for an improved `help-for-help', (continued)
- Re: Proposal for an improved `help-for-help', Stefan Kangas, 2021/02/21
- Consistent face for keys in *Help* and `substitute-command-keys', Stefan Kangas, 2021/02/23
- RE: [External] : Consistent face for keys in *Help* and `substitute-command-keys', Drew Adams, 2021/02/23
- RE: [External] : Consistent face for keys in *Help* and `substitute-command-keys', Stefan Kangas, 2021/02/23
- RE: [External] : Consistent face for keys in *Help* and `substitute-command-keys', Drew Adams, 2021/02/24
- RE: [External] : Consistent face for keys in *Help* and `substitute-command-keys', Stefan Kangas, 2021/02/24
- RE: [External] : Consistent face for keys in *Help* and `substitute-command-keys', Drew Adams, 2021/02/25
- Re: [External] : Consistent face for keys in *Help* and `substitute-command-keys', Eli Zaretskii, 2021/02/25
- RE: [External] : 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', Basil L. Contovounesios, 2021/02/24
- Re: Consistent face for keys in *Help* and `substitute-command-keys',
Stefan Kangas <=
- Re: Consistent face for keys in *Help* and `substitute-command-keys', Basil L. Contovounesios, 2021/02/24
- 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', Lars Ingebrigtsen, 2021/02/24
- Re: Consistent face for keys in *Help* and `substitute-command-keys', Eli Zaretskii, 2021/02/24
- 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